cee60adf868375933ac0eb26e1b84048639e804f braney Fri Feb 24 11:07:54 2023 -0800 ongoing work on snakes diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index f5d9b2d..3409f93 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -3505,30 +3505,38 @@ const struct linkedFeaturesSeries *b = *((struct linkedFeaturesSeries **)vb); return a->grayIx - b->grayIx; } static int cmpLfWhiteToBlack(const void *va, const void *vb) /* Help sort from white to black. */ { const struct linkedFeatures *a = *((struct linkedFeatures **)va); const struct linkedFeatures *b = *((struct linkedFeatures **)vb); int diff = a->filterColor - b->filterColor; if (diff == 0) diff = a->grayIx - b->grayIx; return diff; } +int linkedFeaturesCmpName(const void *va, const void *vb) +/* Help sort linkedFeatures by query name. */ +{ +const struct linkedFeatures *a = *((struct linkedFeatures **)va); +const struct linkedFeatures *b = *((struct linkedFeatures **)vb); +return strcmp(a->name, b->name); +} + int linkedFeaturesCmpStart(const void *va, const void *vb) /* Help sort linkedFeatures by starting pos. */ { const struct linkedFeatures *a = *((struct linkedFeatures **)va); const struct linkedFeatures *b = *((struct linkedFeatures **)vb); return a->start - b->start; } void clippedBarbs(struct hvGfx *hvg, int x, int y, int width, int barbHeight, int barbSpacing, int barbDir, Color color, boolean needDrawMiddle) /* Draw barbed line. Clip it to fit the window first though since * some barbed lines will span almost the whole chromosome, and the * clipping at the lower level is not efficient since we added * PostScript output support. */ {