forked from github/server
fixing problems with blank characters after the \ at line end
This commit is contained in:
parent
7c258dde41
commit
6f45043f19
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue