fixing problems with blank characters after the \ at line end

This commit is contained in:
Enno Rehling 2007-02-05 20:02:07 +00:00
parent 7c258dde41
commit 6f45043f19
1 changed files with 63 additions and 63 deletions

View File

@ -375,7 +375,8 @@ getbuf(FILE * F)
cont = false; cont = false;
while (bp!=NULL && *bp && cp!=buf+MAXLINE && (char*)bp!=lbuf+MAXLINE) { while (bp!=NULL && *bp && cp!=buf+MAXLINE && (char*)bp!=lbuf+MAXLINE) {
if (isspace(*bp)) { if (isspace(*bp)) {
if (eatwhite) { if (cont) ++bp; /* removes spaces and \r afer a backslash */
else if (eatwhite) {
do { ++bp; } while ((char*)bp!=lbuf+MAXLINE && isspace(*bp)); do { ++bp; } while ((char*)bp!=lbuf+MAXLINE && isspace(*bp));
if (!quote && !start && !comment) *(cp++)=' '; if (!quote && !start && !comment) *(cp++)=' ';
} }
@ -394,7 +395,6 @@ getbuf(FILE * F)
} else { } else {
cont = false; cont = false;
if (*bp==COMMENT_CHAR && !quote) { if (*bp==COMMENT_CHAR && !quote) {
/* bp = max(end-1, bp+1); */
comment=true; comment=true;
} }
else { else {