common: add support for C-style /*..*/ comments

Signed-off-by: Ozkan Sezer <sezero@users.sourceforge.net>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Ozkan Sezer 2013-04-14 09:03:54 +09:30 committed by Kevin Shanahan
parent 2539b73868
commit 4a80c38081
1 changed files with 10 additions and 0 deletions

View File

@ -282,6 +282,16 @@ COM_Parse(char *data)
goto skipwhite;
}
/* skip C-style comments */
if (c == '/' && data[1] == '*') {
data += 2;
while (*data && !(*data == '*' && data[1] == '/'))
data++;
if (*data)
data += 2;
goto skipwhite;
}
/* handle quoted strings specially */
if (c == '\"') {
data++;