src/hg/oneShot/freen/freen.c 1.88

1.88 2009/08/27 18:07:35 kent
Testing strptime function.
Index: src/hg/oneShot/freen/freen.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/oneShot/freen/freen.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -b -B -U 1000000 -r1.87 -r1.88
--- src/hg/oneShot/freen/freen.c	16 Mar 2009 01:01:20 -0000	1.87
+++ src/hg/oneShot/freen/freen.c	27 Aug 2009 18:07:35 -0000	1.88
@@ -1,38 +1,36 @@
 /* freen - My Pet Freen. */
 #include "common.h"
 #include "memalloc.h"
 #include "dystring.h"
 #include "linefile.h"
 #include "hash.h"
-#include "bed.h"
-#include "asParse.h"
-#include "jksql.h"
 
 
 static char const rcsid[] = "$Id$";
 
 void usage()
 {
 errAbort("freen - test some hairbrained thing.\n"
          "usage:  freen file\n");
 }
 
 
-void freen(char *s)
+void freen(char *input)
 /* Test some hair-brained thing. */
 {
-int count = atoi(s);
-char *asDef = bedAsDef(count);
-printf("%s",  bedAsDef(count));
-struct asObject *as = asParseText(asDef);
-printf("%d rows\n", slCount(as->columnList));
+struct tm tm;
+char *res = strptime(input, "%d/%b/%Y:%T", &tm);
+time_t tick = mktime(&tm);
+printf("res = %s\n", res);
+printf("%ld ticks\n", (long)tick);
+printf("%s\n", asctime(&tm));
 }
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 if (argc != 2)
     usage();
 freen(argv[1]);
 return 0;
 }