From: Gerd Moellmann Date: Wed, 20 Sep 2000 13:51:22 +0000 (+0000) Subject: (xbm_scan): Allow C-style comments. X-Git-Tag: emacs-pretest-21.0.90~1488 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0a695da7ff63db049bd48e863be69805e44ff698;p=emacs.git (xbm_scan): Allow C-style comments. --- diff --git a/src/xfns.c b/src/xfns.c index 8cc65c4c4f2..b3a8129df52 100644 --- a/src/xfns.c +++ b/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; }