e2ff040d76c018b4207c9eb819c898b0fde42dbf kent Mon Dec 2 16:17:28 2013 -0800 Removing lineFileNextRealWithSize - it was buggy and hard to fix in general case, and only one module was using it. Replaced it with something local to fastqStatsAndSubsample.c. diff --git src/lib/linefile.c src/lib/linefile.c index a614d1e..4fb4cb2 100644 --- src/lib/linefile.c +++ src/lib/linefile.c @@ -812,52 +812,45 @@ *retFullSize = dyStringLen(lf->fullLine); if (retRaw != NULL && dyStringLen(lf->rawLines) > 0) // Only if actually requested & continued { // This is the final line which doesn't have a continuation char dyStringAppendN(lf->rawLines,line,(end - line)); *retRaw = dyStringContents(lf->rawLines); if (retRawSize) *retRawSize = dyStringLen(lf->rawLines); } return TRUE; } return FALSE; } -boolean lineFileNextRealWithSize(struct lineFile *lf, char **retStart, int *retSize) +boolean lineFileNextReal(struct lineFile *lf, char **retStart) /* Fetch next line from file that is not blank and - * does not start with a '#'. Return size of line. */ + * * does not start with a '#'. */ { char *s, c; -while (lineFileNext(lf, retStart, retSize)) +while (lineFileNext(lf, retStart, NULL)) { s = skipLeadingSpaces(*retStart); c = s[0]; if (c != 0 && c != '#') return TRUE; } return FALSE; } -boolean lineFileNextReal(struct lineFile *lf, char **retStart) -/* Fetch next line from file that is not blank and - * does not start with a '#'. */ -{ -return lineFileNextRealWithSize(lf, retStart, NULL); -} - boolean lineFileNextFullReal(struct lineFile *lf, char **retStart) // Fetch next line from file that is not blank and does not start with a '#'. // Continuation lines (ending in '\') are joined into a single line. { while (lineFileNextFull(lf, retStart, NULL, NULL, NULL)) { char *clippedText = skipLeadingSpaces(*retStart); if (clippedText[0] != '\0' && clippedText[0] != '#') return TRUE; } return FALSE; } int lineFileChopNext(struct lineFile *lf, char *words[], int maxWords)