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:
parent
7044c0584d
commit
0a695da7ff
1 changed files with 14 additions and 0 deletions
14
src/xfns.c
14
src/xfns.c
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue