02f9444f186888d2da5d65d9db583ddf2d7b95ca jcasper Thu Oct 22 01:48:20 2020 -0700 Adding trackDb options to change defaults for hic tracks. Also made some of those settings case-insensitive. refs #26312 diff --git src/lib/common.c src/lib/common.c index 15a1da2..d967da2 100644 --- src/lib/common.c +++ src/lib/common.c @@ -1381,30 +1381,45 @@ * the same (ignoring case) otherwise returns difference * between first non-matching characters. */ { char c1, c2; for (;;) { c1 = toupper(*s1++); c2 = toupper(*s2++); if (c1 != c2) /* Takes care of end of string in one but not the other too */ return c2-c1; if (c1 == 0) /* Take care of end of string in both. */ return 0; } } +int differentWordNullOk(char *s1, char *s2) +/* Returns 0 if two strings (either of which may be NULL) + * are the same, ignoring case. Otherwise returns the + * difference between the first non-matching characters. */ +{ +if (s1 == s2) + return FALSE; +else if (s1 == NULL) + return -1; +else if (s2 == NULL) + return 1; +else + return differentWord(s1,s2); +} + int differentStringNullOk(char *a, char *b) /* Returns 0 if two strings (either of which may be NULL) * are the same. Otherwise it returns a positive or negative * number depending on the alphabetical order of the two * strings. * This is basically a strcmp that can handle NULLs in * the input. If used in a sort the NULLs will end * up before any of the cases with data. */ { if (a == b) return FALSE; else if (a == NULL) return -1; else if (b == NULL) return 1;