src/lib/apacheLog.c 1.2

1.2 2009/08/27 03:54:39 kent
Checking for zero chromosome coordinate (supposed to be 1-based coordinates)
Index: src/lib/apacheLog.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/apacheLog.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 4 -r1.1 -r1.2
--- src/lib/apacheLog.c	3 Sep 2005 02:07:40 -0000	1.1
+++ src/lib/apacheLog.c	27 Aug 2009 03:54:39 -0000	1.2
@@ -151,7 +151,22 @@
     unterminatedQuote(&ll, line, fileName, lineIx);
     return NULL;
     }
 ll->program = buf;
+
+/* Parse out elapsed time if it's there. */
+ll->runTime = -1;		/* Marker for unset. */
+char *runTime = nextWord(&e);
+char *seconds = nextWord(&e);
+if (seconds != NULL && sameString(seconds, "seconds"))
+    {
+    if (!isdigit(runTime[0]))
+        {
+	badFormat(&ll, line, fileName, lineIx, "non-numerical seconds");
+	return NULL;
+	}
+    ll->runTime = atoi(runTime);
+    }
+
 return ll;
 }