8acbd9b00d2ab8ffe06111a08903aacc475e8edf kent Thu Oct 24 17:17:36 2013 -0700 Adding lineFileNextRealWithSize. diff --git src/inc/linefile.h src/inc/linefile.h index 1f28171..30f4818 100644 --- src/inc/linefile.h +++ src/inc/linefile.h @@ -103,30 +103,34 @@ /* Close up a list of line files. */ boolean lineFileNext(struct lineFile *lf, char **retStart, int *retSize); /* Fetch next line from file. */ boolean lineFileNextFull(struct lineFile *lf, char **retFull, int *retFullSize, char **retRaw, int *retRawSize); // Fetch next line from file joining up any that are continued by ending '\' // If requested, and was joined, the unjoined raw lines are also returned // NOTE: comment lines can't be continued! ("# comment \ \n more comment" is 2 lines.) boolean lineFileNextReal(struct lineFile *lf, char **retStart); /* Fetch next line from file that is not blank and * does not start with a '#'. */ +boolean lineFileNextRealWithSize(struct lineFile *lf, char **retStart, int *retSize); +/* Fetch next line from file that is not blank and + * does not start with a '#'. Return size of line. */ + 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. void lineFileNeedNext(struct lineFile *lf, char **retStart, int *retSize); /* Fetch next line from file. Squawk and die if it's not there. */ void lineFileReuse(struct lineFile *lf); /* Reuse current line. */ void lineFileReuseFull(struct lineFile *lf); // Reuse last full line read. Unlike lineFileReuse, // lineFileReuseFull only works with previous lineFileNextFull call #define lineFileString(lf) ((lf)->buf + (lf)->lineStart)