# HG changeset patch # User Gerd Moellmann # Date 969457882 0 # Node ID 5f91cf9127a647a75cf6b2f0347f380303da6b74 # Parent bdb5ce245f0e3cdb2c20790c464f6e5f507a6921 (xbm_scan): Allow C-style comments. diff -r bdb5ce245f0e -r 5f91cf9127a6 src/xfns.c --- a/src/xfns.c Wed Sep 20 13:20:32 2000 +0000 +++ b/src/xfns.c Wed Sep 20 13:51:22 2000 +0000 @@ -6329,6 +6329,8 @@ int *ival; { int c; + + loop: /* Skip white space. */ while (*s < end && (c = *(*s)++, isspace (c))) @@ -6391,6 +6393,18 @@ *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; }