diff options
| author | Will Andrews <will@FreeBSD.org> | 2001-03-15 02:51:11 +0000 |
|---|---|---|
| committer | Will Andrews <will@FreeBSD.org> | 2001-03-15 02:51:11 +0000 |
| commit | fff8dac495fde011c2d88115003beb67ba892b99 (patch) | |
| tree | 374f7be14edaa4e5d6664c40cfcc82d8f7342e1d /usr.bin/make/parse.c | |
| parent | 64007795de26a237e6d42a60be717ffd65a2327d (diff) | |
Notes
Diffstat (limited to 'usr.bin/make/parse.c')
| -rw-r--r-- | usr.bin/make/parse.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 7dc9e61073e4..2f1c3369a7fc 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -2057,18 +2057,24 @@ ParseSkipLine(skip) while (((c = ParseReadc()) != '\n' || lastc == '\\') && c != EOF) { - if (c == '\n') { - Buf_ReplaceLastByte(buf, (Byte)' '); - lineno++; + if (c == '#' && lastc != '\\') { + while ((c = ParseReadc()) != '\n' && c != EOF); - while ((c = ParseReadc()) == ' ' || c == '\t'); + break; + } else { + if (c == '\n') { + Buf_ReplaceLastByte(buf, (Byte)' '); + lineno++; - if (c == EOF) - break; - } + while ((c = ParseReadc()) == ' ' || c == '\t'); + + if (c == EOF) + break; + } - Buf_AddByte(buf, (Byte)c); - lastc = c; + Buf_AddByte(buf, (Byte)c); + lastc = c; + } } if (c == EOF) { |
