src/hg/hgBlat/hgBlat.c 1.126

1.126 2009/04/13 17:59:44 galt
fixing chrom name compare function, it was not handling pattern chr99_something
Index: src/hg/hgBlat/hgBlat.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgBlat/hgBlat.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -b -B -U 4 -r1.125 -r1.126
--- src/hg/hgBlat/hgBlat.c	18 Feb 2009 22:45:09 -0000	1.125
+++ src/hg/hgBlat/hgBlat.c	13 Apr 2009 17:59:44 -0000	1.126
@@ -139,10 +139,17 @@
 int cSame = countSameNonDigit(a, b);
 
 a += cSame;
 b += cSame;
-if (allDigits(a) && allDigits(b))
-    return atoi(a) - atoi(b);
+if (isdigit(*a) && isdigit(*b))
+    {
+    int diff = atoi(a) - atoi(b);
+    if (diff != 0)
+	return diff;
+    a = skipNumeric(a);	
+    b = skipNumeric(b);	
+    return strcmp(a,b);
+    }
 else
     return strcmp(a,b);
 }