1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-02 10:11:05 -08:00

(xbm_scan): Allow C-style comments.

This commit is contained in:
Gerd Moellmann 2000-09-20 13:51:22 +00:00
parent 7044c0584d
commit 0a695da7ff

View file

@ -6329,6 +6329,8 @@ xbm_scan (s, end, sval, ival)
int *ival;
{
int c;
loop:
/* Skip white space. */
while (*s < end && (c = *(*s)++, isspace (c)))
@ -6391,6 +6393,18 @@ xbm_scan (s, end, sval, ival)
*s = *s - 1;
c = XBM_TK_IDENT;
}
else if (c == '/' && **s == '*')
{
/* C-style comment. */
++*s;
while (**s && (**s != '*' || *(*s + 1) != '/'))
++*s;
if (**s)
{
*s += 2;
goto loop;
}
}
return c;
}