]> andersk Git - splint.git/blobdiff - src/cscannerHelp.c
Fixed problem with shadow parameters.
[splint.git] / src / cscannerHelp.c
index 3d325d2021c4659575440af931a848c24a178c0d..1aee6d64c1e59e1c7481e993f55e1884bc97885f 100644 (file)
@@ -33,7 +33,7 @@
 # include "cscannerHelp.h"
 # include "cscanner.h"
 # include "cgrammar_tokens.h"
-# include "portab.h"
+# include "osd.h"
 
 static int lminput (void);
 static int s_tokLength = 0;
@@ -747,9 +747,7 @@ bool cscannerHelp_handleSpecial (char *yyt)
        }
 
       llassert (*tmp == '\"');
-
       tmp++;
-
       fname = tmp;
       
       while (*tmp != '\"' && *tmp != '\0')
@@ -758,7 +756,6 @@ bool cscannerHelp_handleSpecial (char *yyt)
        }
 
       llassert (*tmp == '\"');
-
       *tmp = '\0';
 
 # if defined(OS2) || defined(MSDOS) || defined(WIN32)
@@ -2685,7 +2682,12 @@ void cscannerHelp_advanceLine (void)
 
 int cscannerHelp_returnToken (int t)
 {
-  yylval.tok = lltok_create (t, fileloc_decColumn (g_currentloc, s_tokLength)); 
+  if (s_tokLength > fileloc_column (g_currentloc)) {
+    yylval.tok = lltok_create (t, fileloc_copy (g_currentloc));
+  } else {
+    yylval.tok = lltok_create (t, fileloc_decColumn (g_currentloc, s_tokLength)); 
+  }
+
   s_tokLength = 0; 
   s_lastWasString = FALSE; 
   return (t); 
This page took 0.058243 seconds and 4 git commands to generate.