]> andersk Git - splint.git/blobdiff - src/context.c
Renamings to avoid conflicts with type names.
[splint.git] / src / context.c
index e0755e4e2eed131756e6e6add94f519c5be9fc06..08198343d56be3f27edc3572f57f5d43aa6b5531 100644 (file)
@@ -42,7 +42,6 @@
 # include "llmain.h"
 # include "intSet.h"
 # include "osd.h"
-# include "portab.h"
 
 extern /*@external@*/ int yydebug;
 extern /*@external@*/ int mtdebug;
@@ -340,7 +339,7 @@ context_suppressFlagMsg (flagcode flag, fileloc fl)
       return (!context_getFlag (flag)
              || context_inSuppressRegion ()
              || context_inSuppressZone (fl)
-             || (/*@!@@#@ gc.inDerivedFile && */ context_inSuppressFlagZone (fl, flag)));
+             || (context_inSuppressFlagZone (fl, flag))); /* removed gc.inDerivedFile from this */
     }
   else
     {
@@ -808,9 +807,9 @@ context_resetAllFlags (void)
            case FLG_BOOLTYPE:
              val = cstring_makeLiteral (DEFAULT_BOOLTYPE); break;
            case FLG_BOOLFALSE:
-             val = cstring_makeLiteral ("FALSE"); break;
+             val = cstring_makeLiteral ("false"); break;
            case FLG_BOOLTRUE:
-             val = cstring_makeLiteral ("TRUE"); break;
+             val = cstring_makeLiteral ("true"); break;
            case FLG_MACROVARPREFIX: 
              val = cstring_makeLiteral ("m_"); break;
            case FLG_SYSTEMDIRS:
@@ -884,7 +883,7 @@ context_resetAllFlags (void)
   gc.flags[FLG_WARNFLAGS] = TRUE;
   gc.flags[FLG_WARNRC] = TRUE;
   gc.flags[FLG_FILEEXTENSIONS] = TRUE;
-  gc.flags[FLG_WARNUNIXLIB] = TRUE;
+  gc.flags[FLG_WARNUNIXLIB] = FALSE;
   gc.flags[FLG_WARNPOSIX] = TRUE;
   gc.flags[FLG_SHOWCOL] = TRUE;
   gc.flags[FLG_SHOWDEEPHISTORY] = FALSE; /* TRUE; */
@@ -2898,20 +2897,6 @@ context_setString (flagcode flag, cstring val)
 
   switch (flag)
     {
-      /*
-    case FLG_BOOLTRUE:
-      usymtab_supGlobalEntry 
-       (uentry_makeConstantValue (val, ctype_bool, 
-                                  fileloc_getBuiltin (), TRUE, 
-                                  multiVal_makeInt (1)));
-      break;
-    case FLG_BOOLFALSE:
-      usymtab_supGlobalEntry 
-       (uentry_makeConstantValue (val, ctype_bool, 
-                                  fileloc_getBuiltin (), FALSE, 
-                                  multiVal_makeInt (0)));
-      break;
-      */
     case FLG_MESSAGESTREAM:
     case FLG_WARNINGSTREAM:
     case FLG_ERRORSTREAM:
@@ -3787,8 +3772,8 @@ context_userSetFlag (flagcode f, bool b)
              llerror_flagWarning
                (cstring_makeLiteral
                 ("Selecting unix library.  Unix library is "
-                 "ad hoc addition to POSIX library.  Recommend "
-                 "use +posixlib to select POSIX library instead. "
+                 "based on the Single Unix Specification, Version 2.  Not all "
+                 "Unix implementations are consistend with this specification. "
                  "Use -warnunixlib to suppress this message."));
            }
        }
@@ -4389,8 +4374,6 @@ context_destroyMod (void)
   globSet_free (gc.globs_used);
   metaStateTable_free (gc.stateTable);
   annotationTable_free (gc.annotTable);
-
-  
 }
 
 /*
@@ -4812,27 +4795,23 @@ metaStateInfo context_lookupMetaStateInfo (cstring key)
 
 /*@null@*/ annotationInfo context_lookupAnnotation (cstring annot) 
 {
-  annotationInfo ainfo;
-
-  ainfo = annotationTable_lookup (gc.annotTable, annot);
-
-  return ainfo;
+  return annotationTable_lookup (gc.annotTable, annot);
 }
 
-void context_addAnnotation (annotationInfo ainfo)
+void context_addAnnotation (annotationInfo info)
 {
-  if (annotationTable_contains (gc.annotTable, annotationInfo_getName (ainfo)))
+  if (annotationTable_contains (gc.annotTable, annotationInfo_getName (info)))
     {
       voptgenerror 
        (FLG_SYNTAX,
-        message ("Duplicate annotation declaration: %s", annotationInfo_getName (ainfo)),
-        annotationInfo_getLoc (ainfo));
+        message ("Duplicate annotation declaration: %s", annotationInfo_getName (info)),
+        annotationInfo_getLoc (info));
 
-      annotationInfo_free (ainfo);
+      annotationInfo_free (info);
     }
   else
     {
-      annotationTable_insert (gc.annotTable, ainfo);
+      annotationTable_insert (gc.annotTable, info);
     }
 }
 
@@ -4854,7 +4833,7 @@ void context_addMetaState (cstring mname, metaStateInfo msinfo)
     }
 }
 
-valueTable context_createValueTable (sRef s, stateInfo sinfo)
+valueTable context_createValueTable (sRef s, stateInfo info)
 {
   if (metaStateTable_size (gc.stateTable) > 0)
     {
@@ -4875,7 +4854,7 @@ valueTable context_createValueTable (sRef s, stateInfo sinfo)
                (res,
                 cstring_copy (metaStateInfo_getName (msi)),
                 stateValue_createImplicit (metaStateInfo_getDefaultValue (msi, s), 
-                                           stateInfo_copy (sinfo)));
+                                           stateInfo_copy (info)));
            }
          else
            {
@@ -4884,18 +4863,18 @@ valueTable context_createValueTable (sRef s, stateInfo sinfo)
        } 
       end_metaStateTable_elements ;
       
-      stateInfo_free (sinfo);
+      stateInfo_free (info);
       DPRINTF (("Value table: %s", valueTable_unparse (res)));
       return res;
     }
   else
     {
-      stateInfo_free (sinfo);
+      stateInfo_free (info);
       return valueTable_undefined;
     }
 }
 
-valueTable context_createGlobalMarkerValueTable (stateInfo sinfo)
+valueTable context_createGlobalMarkerValueTable (stateInfo info)
 {
   if (metaStateTable_size (gc.stateTable) > 0)
     {
@@ -4911,17 +4890,17 @@ valueTable context_createGlobalMarkerValueTable (stateInfo sinfo)
          valueTable_insert (res,
                             cstring_copy (metaStateInfo_getName (msi)),
                             stateValue_create (metaStateInfo_getDefaultGlobalValue (msi),
-                                               stateInfo_copy (sinfo)));
+                                               stateInfo_copy (info)));
        } 
       end_metaStateTable_elements ;
       
-      stateInfo_free (sinfo);
+      stateInfo_free (info);
       DPRINTF (("Value table: %s", valueTable_unparse (res)));
       return res;
     }
   else
     {
-      stateInfo_free (sinfo);
+      stateInfo_free (info);
       return valueTable_undefined;
     }
 }
@@ -4974,7 +4953,7 @@ struct sInfo {
 
 /*@-paramuse@*/
 
-void context_setGlobalStructInfo(ctype ct, constraintList list)
+void context_setGlobalStructInfo (ctype ct, constraintList list)
 {
 # if 0
   /* int i;
This page took 0.040072 seconds and 4 git commands to generate.