98faa189349f1bb9b033f314ffe327541bacf290 chmalee Tue Mar 31 15:17:30 2026 -0700 Add a new hgFindSpec setting, searchItemLabel, that allows using hgFindSpec defined labels (with variable substitution) as the label for each line of a search result. This only works for bigBed tracks. refs #37299 diff --git src/hg/lib/hui.c src/hg/lib/hui.c index baa53636309..81c1a0d2864 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -10321,81 +10321,30 @@ struct slName *asColNames(struct asObject *as) // Get list of column names. { struct slName *list = NULL, *el; struct asColumn *col; for (col = as->columnList; col != NULL; col = col->next) { el = slNameNew(col->name); slAddHead(&list, el); } slReverse(&list); return list; } -static struct dyString *subMultiField(char *pattern, int fieldCount, - char *in[], char *out[]) -/* Substitute $in with out values in pattern */ -{ -int i; -struct dyString *s = dyStringNew(256), *d = NULL; -dyStringAppend(s, pattern); -for (i=0; istring)) - { - d = dyStringSub(s->string, strictSpec, out[i]); - s = d; - } - // the user may have both a ${} enclosed instance and a non-enclosed one! - d = dyStringSub(s->string, spec, out[i]); - - dyStringFree(&s); - freeMem(spec); - freeMem(strictSpec); - s = d; - d = NULL; - } -return s; -} - -char *replaceFieldInPattern(char *pattern, int fieldCount, char **fieldNames, char **fieldVals) -/* Replace $fieldName in pattern with value. Used in trackDb mouseOver setting */ -{ -struct dyString *ds = subMultiField(pattern, fieldCount, fieldNames, fieldVals); -return dyStringCannibalize(&ds); -} - static struct dyString *subMulti(char *orig, int subCount, char *in[], char *out[]) /* Perform multiple substitions on orig. */ { int i; struct dyString *s = dyStringNew(256), *d = NULL; dyStringAppend(s, orig); for (i=0; istring, in[i], out[i]); dyStringFree(&s);