a3739b776a1dff6f5b07d035faa320d22c975c48 braney Mon Jul 15 14:08:31 2024 -0700 make priority optional in groups.txt. Also actually sort by priority if specified diff --git src/hg/inc/grp.h src/hg/inc/grp.h index 3d5b9c1..872bed8 100644 --- src/hg/inc/grp.h +++ src/hg/inc/grp.h @@ -45,30 +45,33 @@ void grpFreeList(struct grp **pList); /* Free a list of dynamically allocated grp's */ void grpOutput(struct grp *el, FILE *f, char sep, char lastSep); /* Print out grp. Separate fields with sep. Follow last field with lastSep. */ #define grpTabOut(el,f) grpOutput(el,f,'\t','\n'); /* Print out grp as a line in a tab-separated file. */ #define grpCommaOut(el,f) grpOutput(el,f,',',','); /* Print out grp as a comma separated list including final comma. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ +int grpCmpPriorityLabel(const void *va, const void *vb); +/* Compare to sort based on priority and label. */ + int grpCmpPriority(const void *va, const void *vb); /* Compare to sort based on priority. */ int grpCmpName(const void *va, const void *vb); /* Compare to sort based on name. */ void grpSuperimpose(struct grp **listA, struct grp **listB); /* Replace all the grps in listA with the same names of those in * listB. Ones in B that aren't the same get put in A too. * The function returns with the new list A, and the empty list * B. */ struct grp *grpDup(struct grp *grp); /* duplicate a grp structure */