make gas2masm drop any "preprocessor" directives (any line where the first non-whitespace char is #)

This commit is contained in:
Thad Ward 2000-11-02 07:35:30 +00:00
parent 2fc438ca13
commit cf01a7c2f2
1 changed files with 12 additions and 0 deletions

View File

@ -805,6 +805,18 @@ int gettoken (void)
return LINE_DONE; return LINE_DONE;
} while (stat == WHITESPACE); } while (stat == WHITESPACE);
if (c == '#')
{
do
{
if ((c = getchar()) == EOF)
return FILE_DONE;
} while (whitespace(c) != LINE_DONE);
return LINE_DONE;
}
token[0] = c; token[0] = c;
count = 1; count = 1;