changeset 31768:5f91cf9127a6

(xbm_scan): Allow C-style comments.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 20 Sep 2000 13:51:22 +0000
parents bdb5ce245f0e
children 33409fc6f40f
files src/xfns.c
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }