diff options
| author | Gerd Moellmann | 2000-09-20 13:51:22 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-09-20 13:51:22 +0000 |
| commit | 0a695da7ff63db049bd48e863be69805e44ff698 (patch) | |
| tree | cc2f1c5154c5947d16e5838fbf9f03c28773628e /src | |
| parent | 7044c0584d3c47b41ef53ee0aa3fbc9a7e7ad3f7 (diff) | |
| download | emacs-0a695da7ff63db049bd48e863be69805e44ff698.tar.gz emacs-0a695da7ff63db049bd48e863be69805e44ff698.zip | |
(xbm_scan): Allow C-style comments.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 14 |
1 files changed, 14 insertions, 0 deletions
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) | |||
| 6329 | int *ival; | 6329 | int *ival; |
| 6330 | { | 6330 | { |
| 6331 | int c; | 6331 | int c; |
| 6332 | |||
| 6333 | loop: | ||
| 6332 | 6334 | ||
| 6333 | /* Skip white space. */ | 6335 | /* Skip white space. */ |
| 6334 | while (*s < end && (c = *(*s)++, isspace (c))) | 6336 | while (*s < end && (c = *(*s)++, isspace (c))) |
| @@ -6391,6 +6393,18 @@ xbm_scan (s, end, sval, ival) | |||
| 6391 | *s = *s - 1; | 6393 | *s = *s - 1; |
| 6392 | c = XBM_TK_IDENT; | 6394 | c = XBM_TK_IDENT; |
| 6393 | } | 6395 | } |
| 6396 | else if (c == '/' && **s == '*') | ||
| 6397 | { | ||
| 6398 | /* C-style comment. */ | ||
| 6399 | ++*s; | ||
| 6400 | while (**s && (**s != '*' || *(*s + 1) != '/')) | ||
| 6401 | ++*s; | ||
| 6402 | if (**s) | ||
| 6403 | { | ||
| 6404 | *s += 2; | ||
| 6405 | goto loop; | ||
| 6406 | } | ||
| 6407 | } | ||
| 6394 | 6408 | ||
| 6395 | return c; | 6409 | return c; |
| 6396 | } | 6410 | } |