comparison files.c @ 178:0d5b9651b240

Merge Joerg's changes into upstream. (now that they've been thrashed out a bit, include CHANGES entries, etc.)
author David A. Holland
date Fri, 12 Jun 2015 03:05:49 -0400
parents ffdb0b73856f
children 4c3375895c6e
comparison
equal deleted inserted replaced
156:e8f7ae63844f 178:0d5b9651b240
272 assert(buf[lineend] == '\0'); 272 assert(buf[lineend] == '\0');
273 273
274 /* count how many commented-out newlines we swallowed */ 274 /* count how many commented-out newlines we swallowed */
275 places.nextline.line += countnls(buf, linestart, lineend); 275 places.nextline.line += countnls(buf, linestart, lineend);
276 276
277 /* if the line isn't empty, process it */ 277 /* process the line (even if it's empty) */
278 if (lineend > linestart) { 278 directive_gotline(&places, buf+linestart, lineend-linestart);
279 directive_gotline(&places,
280 buf+linestart, lineend-linestart);
281 }
282 279
283 linestart = nextlinestart; 280 linestart = nextlinestart;
284 lineend = findeol(buf, linestart, bufend); 281 lineend = findeol(buf, linestart, bufend);
285 places.current = places.nextline; 282 places.current = places.nextline;
286 } 283 }