fixed bugs, added dynamic buffer allocation

This commit is contained in:
eck
1989-11-22 12:59:15 +00:00
parent d73d657cda
commit a1b292bb31
8 changed files with 362 additions and 262 deletions

View File

@@ -56,11 +56,10 @@ skipspaces(ch, skipnl)
}
}
SkipToNewLine(garbage)
int garbage;
SkipToNewLine()
{
register int ch;
register int pstrict = 0;
register int garbage = 0;
while ((ch = GetChar()) != '\n') {
if (ch == '/') {
@@ -69,9 +68,9 @@ SkipToNewLine(garbage)
continue;
}
}
if (garbage && !is_wsp(ch))
pstrict = 1;
if (!is_wsp(ch))
garbage = 1;
}
++LineNumber;
return pstrict;
return garbage;
}