]> andersk Git - splint.git/blobdiff - src/flags.c
Improved tracking of state change locations. Added +showdeephistory
[splint.git] / src / flags.c
index 4763a50a9e9499348612f5a19074b759ee89d192..67387540d6910c69ccbcee49b925c677fe365aff 100644 (file)
@@ -149,6 +149,10 @@ static /*@observer@*/ cstring argcode_unparse (argcode arg)
 # endif
 }      
 
+# ifdef WIN32
+# pragma warning (enable:4715) 
+# endif
+
 typedef struct { 
   flagkind main;
   flagkind sub;
@@ -1263,7 +1267,7 @@ flags_identifyFlagAux (cstring s, bool quiet)
   return res;
 }
 
-void setValueFlag (flagcode opt, cstring arg)
+void flags_setValueFlag (flagcode opt, cstring arg)
 {
   switch (opt)
     {
@@ -1272,6 +1276,7 @@ void setValueFlag (flagcode opt, cstring arg)
     case FLG_LIMIT:  
     case FLG_LINELEN:
     case FLG_INDENTSPACES:
+    case FLG_LOCINDENTSPACES:
     case FLG_BUGSLIMIT:
     case FLG_EXTERNALNAMELEN:
     case FLG_INTERNALNAMELEN:
@@ -1313,11 +1318,11 @@ void setValueFlag (flagcode opt, cstring arg)
          }
       }
       break;
-    BADDEFAULT;
+      BADDEFAULT;
     }
 }
 
-void setStringFlag (flagcode opt, /*@only@*/ cstring arg)
+void flags_setStringFlag (flagcode opt, /*@only@*/ cstring arg)
 {
   switch (opt)
     {
@@ -1671,7 +1676,7 @@ flags_processFlags (bool inCommandLine,
          cstring flagname = cstring_fromChars (thisarg + 1); /* skip '-' or '+' */
          flagcode opt = flags_identifyFlag (flagname);
 
-         DPRINTF (("Flag: %s", flagcode_unparse (opt)));
+         DPRINTF (("Flag [%s]: %s", flagname, flagcode_unparse (opt)));
          
          if (flagcode_isInvalid (opt))
            {
@@ -1783,7 +1788,7 @@ flags_processFlags (bool inCommandLine,
                    {
                      if (++i < argc)
                        {
-                         setValueFlag (opt, cstring_fromChars (argv[i]));
+                         flags_setValueFlag (opt, cstring_fromCharsNew (argv[i]));
                        }
                      else
                        {
@@ -1799,7 +1804,7 @@ flags_processFlags (bool inCommandLine,
                    {
                      if (++i < argc)
                        {
-                         setValueFlag (opt, cstring_fromChars (argv[i]));
+                         flags_setValueFlag (opt, cstring_fromCharsNew (argv[i]));
                        }
                      else
                        {
@@ -1859,7 +1864,7 @@ flags_processFlags (bool inCommandLine,
                                }
                              else
                                {
-                                 setStringFlag (opt, cstring_copy (arg));
+                                 flags_setStringFlag (opt, cstring_copy (arg));
                                }
                            }
                        }
@@ -1959,3 +1964,12 @@ flags_processFlags (bool inCommandLine,
 
   cstringSList_free (fl); /* evans 2002-07-12: why wasn't this reported!?? */
 }
+
+int flagcode_priority (/*@unused@*/ flagcode code)
+{
+  /*
+  ** For now, we do a really simple prioritization: all are 1
+  */
+
+  return 1;
+}
This page took 0.061984 seconds and 4 git commands to generate.