OSSP CVS Repository

ossp - Difference in ossp-pkg/cfg/cfg_syn_scan.l versions 1.8 and 1.9
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/cfg/cfg_syn_scan.l 1.8 -> 1.9

--- cfg_syn_scan.l       2002/07/10 12:00:23     1.8
+++ cfg_syn_scan.l       2002/07/17 14:48:08     1.9
@@ -82,6 +82,7 @@
     /* local variables */
     char  caStr[1024];
     char *cpStr = NULL;
+    int   nCommentOpen = 0;
     int   nQuoteOpen = 0;
     char  cQuoteOpen = '\0';
     char  cQuoteClose = '\0';
@@ -93,10 +94,16 @@
 
     /* C-style block comment */
 "/*" {
+    nCommentOpen = 1;
     BEGIN(SS_CO_C);
 }
+<SS_CO_C>"/*" {
+    nCommentOpen++;
+}
 <SS_CO_C>"*/" {
-    BEGIN(INITIAL);
+    nCommentOpen--;
+    if (nCommentOpen == 0)
+        BEGIN(INITIAL);
 }
 <SS_CO_C>(.|\n) {
     /* no-op */

CVSTrac 2.0.1