98d595118a466c5ef78850d88a2e41f06049d548 galt Wed Nov 19 14:21:02 2025 -0800 Max prefers to have one shared copy of the routine. This changes does not affect functionality, just moves the routine into the trackDb.c lib file. Feedback from Max code review. refs #28113 diff --git src/hg/utils/tdbQuery/tdbQuery.c src/hg/utils/tdbQuery/tdbQuery.c index a88e6a1188a..3f24eaadef8 100644 --- src/hg/utils/tdbQuery/tdbQuery.c +++ src/hg/utils/tdbQuery/tdbQuery.c @@ -875,95 +875,44 @@ childFp->fileName, child->key, childFp->startLineIx, parent->key, parentFp->startLineIx); struct tdbRecord *closestParent = closestTdbAboveLevel(recordList, childFp, parentDepth); assert(closestParent != NULL); if (closestParent != parent) errAbort("%s comes between parent (%s) and child (%s) in %s\n" "Parent at line %d, child at line %d.", closestParent->key, parent->key, child->key, childFp->fileName, parentFp->startLineIx, childFp->startLineIx); } } } } -static boolean isComplex(char *name) -/* Check to see if this is one of the filter variables that have arbitrary initial strings. - * This routine copied to hubCheck. */ -{ -if (startsWith("yAxisLabel.", name)) - return TRUE; -if (startsWith("filter.", name)) - return TRUE; -if (startsWith("filterValues.", name)) - return TRUE; -if (startsWith("filterValuesDefault.", name)) - return TRUE; -if (startsWith("filterType.", name)) - return TRUE; -if (startsWith("filterLimits.", name)) - return TRUE; -if (startsWith("filterLabel.", name)) - return TRUE; -if (startsWith("filterByRange.", name)) - return TRUE; -if (startsWith("filterText.", name)) - return TRUE; -if (endsWith(name, "Filter")) - return TRUE; -if (endsWith(name, "FilterValues")) - return TRUE; -if (endsWith(name, "FilterType")) - return TRUE; -if (endsWith(name, "FilterLimits")) - return TRUE; -if (endsWith(name, "FilterText")) - return TRUE; -if (startsWith("highlight.", name)) - return TRUE; -if (startsWith("highlightValues.", name)) - return TRUE; -if (startsWith("highlightValuesDefault.", name)) - return TRUE; -if (startsWith("highlightType.", name)) - return TRUE; -if (startsWith("highlightLimits.", name)) - return TRUE; -if (startsWith("highlightLabel.", name)) - return TRUE; -if (startsWith("highlightByRange.", name)) - return TRUE; -if (startsWith("highlightText.", name)) - return TRUE; -return FALSE; -} - static void doRecordChecks(struct tdbRecord *recordList, struct lm *lm) /* Do additional checks on records. */ { /* Check fields against tagTypes.tab. */ struct tdbRecord *record; for (record = recordList; record != NULL; record = record->next) { struct tdbField *typeField = tdbRecordField(record, "type"); char *fullType = (typeField != NULL ? typeField->val : record->key); char *type = lmCloneFirstWord(lm, fullType); struct tdbField *field; for (field = record->fieldList; field != NULL; field = field->next) { - if (isComplex(field->name)) + if (isComplexSetting(field->name)) continue; struct slName *typeList = rqlHashFindValEvenInWilds(glTagTypes, field->name); if (typeList == NULL) { recordAbort(record, "Tag '%s' not found in %s.\nIf it's not a typo please add %s to " "that file. The tag is", field->name, glTagTypeFile, field->name); } if (!matchAnyWild(typeList, type)) { recordAbort(record, "Tag '%s' not allowed for tracks of type '%s'. " "Please add it to supported types\n" "in %s if this is not a mistake. The tag is", field->name, type, glTagTypeFile); }