comparison directive.c @ 175:ffdb0b73856f

Suppress blank lines later. Fixes the rest of the bizarre spacing behavior described in changeset 82cc6fa54b01. Expand t39 to cover more cases, too.
author David A. Holland
date Fri, 12 Jun 2015 02:38:04 -0400
parents 6ff17ab68b16
children a2f047301c15
comparison
equal deleted inserted replaced
174:09cfad6772de 175:ffdb0b73856f
636 if (warns.nestcomment) { 636 if (warns.nestcomment) {
637 directive_scancomments(lp, line, len); 637 directive_scancomments(lp, line, len);
638 } 638 }
639 639
640 /* check if we have a directive line (# exactly in column 0) */ 640 /* check if we have a directive line (# exactly in column 0) */
641 if (line[0] == '#') { 641 if (len > 0 && line[0] == '#') {
642 skip = 1 + strspn(line + 1, ws); 642 skip = 1 + strspn(line + 1, ws);
643 assert(skip <= len); 643 assert(skip <= len);
644 lp->current.column += skip; 644 lp->current.column += skip;
645 assert(line[len] == '\0'); 645 assert(line[len] == '\0');
646 directive_gotdirective(lp, line+skip /*, length = len-skip */); 646 directive_gotdirective(lp, line+skip /*, length = len-skip */);