38dd9122b6a2e1fefb229f37d95686a7fa80c4a3 tdreszer Fri Apr 15 17:49:09 2011 -0700 Initial checkin of continuation char support in RA files diff --git src/hg/lib/trackDbCustom.c src/hg/lib/trackDbCustom.c index f32886b..b6ae4d6 100644 --- src/hg/lib/trackDbCustom.c +++ src/hg/lib/trackDbCustom.c @@ -273,61 +273,61 @@ * non-NULL then only load tracks that mesh with release. */ { char *raFile = lf->fileName; char *line, *word; struct trackDb *btList = NULL, *bt; boolean done = FALSE; char *incFile; for (;;) { /* Seek to next line that starts with 'track' */ for (;;) { char *subRelease; - if (!lineFileNext(lf, &line, NULL)) + if (!lineFileNextFull(lf, &line, NULL)) // NOTE: lineFileNextFull joins continuation lines { done = TRUE; break; } line = skipLeadingSpaces(line); if (startsWithWord("track", line)) { - lineFileReuse(lf); + lineFileReuseFull(lf); // NOTE: lineFileReuseFull only works with previous lineFileNextFull call break; } else if ((incFile = trackDbInclude(raFile, line, &subRelease)) != NULL) { if (subRelease) trackDbCheckValidRelease(subRelease); if (releaseTag && subRelease && !sameString(subRelease, releaseTag)) errAbort("Include with release %s inside include with release %s line %d of %s", subRelease, releaseTag, lf->lineIx, lf->fileName); struct trackDb *incTdb = trackDbFromRa(incFile, subRelease); btList = slCat(btList, incTdb); } } if (done) break; /* Allocate track structure and fill it in until next blank line. */ bt = trackDbNew(); slAddHead(&btList, bt); for (;;) { /* Break at blank line or EOF. */ - if (!lineFileNext(lf, &line, NULL)) + if (!lineFileNextFull(lf, &line, NULL)) // NOTE: lineFileNextFull joins continuation lines break; line = skipLeadingSpaces(line); if (line == NULL || line[0] == 0) break; /* Skip comments. */ if (line[0] == '#') continue; /* Parse out first word and decide what to do. */ word = nextWord(&line); if (line == NULL) errAbort("No value for %s line %d of %s", word, lf->lineIx, lf->fileName); line = trimSpaces(line); trackDbUpdateOldTag(&word, &line);