fixed bugs, added dynamic buffer allocation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user