64f10b4687eae05cf0f5ce9986b40c164d6ea8bc
hiram
  Tue Feb 14 11:31:03 2017 -0800
add description to searchTrix results refs #13673

diff --git src/hg/lib/hgFind.c src/hg/lib/hgFind.c
index 5e4bdbb..d239593 100644
--- src/hg/lib/hgFind.c
+++ src/hg/lib/hgFind.c
@@ -2591,31 +2591,31 @@
 		       char *table)
 {
 if (relativeFlag)
     hUserAbort("Sorry, range spec (\":%d-%d\") is not supported for %s.",
 	     relStart+1, relEnd, table);
 
 }
 #endif
 
 static boolean findBigBed(char *db, struct hgFindSpec *hfs, char *spec,
 			    struct hgPositions *hgp)
 /* Look up items in bigBed  */
 {
 struct trackDb *tdb = tdbFindOrCreate(db, NULL, hfs->searchTable);
 
-return findBigBedPosInTdbList(db, tdb, spec, hgp);
+return findBigBedPosInTdbList(db, tdb, spec, hgp, hfs);
 }
 
 static boolean searchSpecial(char *db, struct hgFindSpec *hfs, char *term, int limitResults,
 			     struct hgPositions *hgp, boolean relativeFlag,
 			     int relStart, int relEnd, boolean *retFound)
 /* Handle searchTypes for which we have special code.  Return true if 
  * we have special code.  Set retFind according to whether we find term. */
 {
 boolean isSpecial = TRUE;
 boolean found = FALSE;
 char *upcTerm = cloneString(term);
 touppers(upcTerm);
 if (sameString(hfs->searchType, "knownGene"))
     {
     if (gotFullText(db))
@@ -2714,54 +2714,30 @@
     {
     if (!isFuzzy || keyIsPrefixIgnoreCase(term, row[1]))
         {
 	xrefPtr = slPairNew(cloneString(row[1]), cloneString(row[0]));
 	slAddHead(&xrefList, xrefPtr);
 	}
     }
 sqlFreeResult(&sr);
 hFreeConn(&conn);
 slReverse(&xrefList);
 if (xrefList == NULL && hgFindSpecSetting(hfs, "searchBoth") != NULL)
     xrefList = slPairNew(cloneString(""), cloneString(term));
 return(xrefList);
 }
 
-
-int vatruncatef(char *buf, int size, char *format, va_list args)
-/* Like vasafef, but truncates the formatted string instead of barfing on 
- * overflow. */
-{
-char *truncStr = " [truncated]";
-int sz = vsnprintf(buf, size, format, args);
-/* note that some version return -1 if too small */
-if ((sz < 0) || (sz >= size))
-    strncpy(buf + size - 1 - strlen(truncStr), truncStr, strlen(truncStr));
-buf[size-1] = 0;
-return sz;
-}
-
-void truncatef(char *buf, int size, char *format, ...)
-/* Like safef, but truncates the formatted string instead of barfing on 
- * overflow. */
-{
-va_list args;
-va_start(args, format);
-vatruncatef(buf, size, format, args);  // ignore returned size
-va_end(args);
-}
-
 static boolean doQuery(char *db, struct hgFindSpec *hfs, char *xrefTerm, char *term,
 		       struct hgPositions *hgp,
 		       boolean relativeFlag, int relStart, int relEnd,
 		       boolean multiTerm)
 /* Perform a query as specified in hfs, assuming table existence has been 
  * checked and xref'ing has been taken care of. */
 {
 struct slName *tableList = hSplitTableNames(db, hfs->searchTable);
 struct slName *tPtr = NULL;
 struct hgPosTable *table = NULL;
 struct hgPos *pos = NULL;
 struct sqlConnection *conn = hAllocConn(db);
 struct sqlResult *sr = NULL;
 char **row = NULL;
 char *termPrefix = hgFindSpecSetting(hfs, "termPrefix");