src/hg/lib/customFactory.c 1.126
1.126 2010/06/01 20:38:07 galt
cannot use char which is 1 byte to represent EOF, must use int
Index: src/hg/lib/customFactory.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/customFactory.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -b -B -U 4 -r1.125 -r1.126
--- src/hg/lib/customFactory.c 1 Jun 2010 20:35:36 -0000 1.125
+++ src/hg/lib/customFactory.c 1 Jun 2010 20:38:07 -0000 1.126
@@ -1317,9 +1317,9 @@
/* Load ascii file into database via pipeline. */
struct pipeline *dataPipe = wigLoaderPipe(track);
FILE *in = mustOpen(wigAscii, "r");
FILE *out = pipelineFile(dataPipe);
- int c;
+ int c; /* fgetc and fputc work with int. char type cannot represent EOF properly. */
int fputcErr = 0;
unlink(wigAscii);/* stays open, disappears when close or pipe fail */
while ((c = fgetc(in)) != EOF && fputcErr != EOF)