ae751438b669c74fd5809bfed90f725037f60417 braney Fri Jul 30 16:18:11 2021 -0700 add support for second page of help results to hgTables and hgVai. Move "no results" printf to library. Change comment in hgTables/identifiers.c to make more sense. diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 98896fb..a1cf461 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -9408,49 +9408,40 @@ static boolean resolvePosition(char **pPosition) /* Position may be an already-resolved chr:start-end, or a search term. * If it is a search term: * 1 match ==> set globals chromName, winStart, winEnd, return TRUE. * 0 matches ==> switch back to lastPosition, hopefully get 1 match from that; * set globals chromName, winStart, winEnd, return TRUE. If no lastPosition, try w/hDefaultPos(). * multiple matches ==> Display a page with links to match positions, return FALSE. */ { boolean resolved = TRUE; struct dyString *dyWarn = dyStringNew(0); boolean noShort = (cartOptionalString(cart, "noShort") != NULL); hgp = hgFindSearch(cart, pPosition, &chromName, &winStart, &winEnd, hgTracksName(), dyWarn); if (isNotEmpty(dyWarn->string)) { if (noShort) // we're on the second pass of the search - { - // tell the user we didn't find anything - char *menuStr = menuBar(cart, database); - if (menuStr) - puts(menuStr); - FILE *f = stdout; - fprintf(f, "
\n"); - fprintf(f, "

No additional items found

"); - resolved = FALSE; - } + hgp->posCount = 0; // hgFindSearch gives us a bogus hgp if the warn string is set else warn("%s", dyWarn->string); } if (!noShort && hgp->singlePos) { createHgFindMatchHash(); } -else if (resolved) // if we haven't put out the "found nothing" text above +else { char *menuStr = menuBar(cart, database); if (menuStr) puts(menuStr); hgPositionsHtml(database, hgp, hgTracksName(), cart); resolved = FALSE; } cartSetString(cart, "position", *pPosition); return resolved; } void parseVirtPosition(char *position) /* parse virtual position * TODO this is just temporary */ {