src/hg/oneShot/freen/freen.c 1.93

1.93 2009/11/22 00:18:05 kent
Adding simplifyPathToDir
Index: src/hg/oneShot/freen/freen.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/oneShot/freen/freen.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -b -B -U 1000000 -r1.92 -r1.93
--- src/hg/oneShot/freen/freen.c	12 Nov 2009 23:11:54 -0000	1.92
+++ src/hg/oneShot/freen/freen.c	22 Nov 2009 00:18:05 -0000	1.93
@@ -1,55 +1,42 @@
 /* freen - My Pet Freen. */
 #include "common.h"
 #include "options.h"
 #include "zlibFace.h"
 #include "memalloc.h"
 #include "dystring.h"
 #include "linefile.h"
 #include "hash.h"
 #include "obscure.h"
 
+char *simplifyPathToDir(char *path);
 
 static char const rcsid[] = "$Id$";
 
 void usage()
 {
 errAbort("freen - test some hairbrained thing.\n"
          "usage:  freen file\n");
 }
 
 static struct optionSpec options[] = {
    {NULL, 0},
 };
 
 
-void freen(char *input, char *output, char *uncompressed)
+void freen(char *input)
 /* Test some hair-brained thing. */
 {
-size_t uncompressedSize;
-char *uncompressedBuf;
-readInGulp(input, &uncompressedBuf, &uncompressedSize);
-size_t compBufSize = zCompBufSize(uncompressedSize);
-char *compBuf = needLargeMem(compBufSize);
-size_t compressedSize = zCompress(uncompressedBuf, uncompressedSize, compBuf, compBufSize);
-printf("uncompressedSize %d, compressedSize %d\n", (int)uncompressedSize, (int)compressedSize);
-FILE *f = mustOpen(output, "wb");
-mustWrite(f, compBuf, compressedSize);
-carefulClose(&f);
-f = mustOpen(uncompressed, "wb");
-memset(uncompressedBuf, 0, uncompressedSize);
-size_t uncSize = zUncompress(compBuf, compressedSize, uncompressedBuf, uncompressedSize);
-printf("uncompressedSize %d\n", (int)uncSize);
-mustWrite(f, uncompressedBuf, uncSize);
-carefulClose(&f);
+extern void simplifyPathToDirSelfTest();
+simplifyPathToDirSelfTest();
+printf("%s\n", simplifyPathToDir(input));
 }
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 optionInit(&argc, argv, options);
-if (argc != 4)
+if (argc != 2)
     usage();
-zSelfTest(100);
-freen(argv[1], argv[2], argv[3]);
+freen(argv[1]);
 return 0;
 }