]> andersk Git - splint.git/commitdiff
Renamings to avoid conflicts with type names.
authorevans1629 <evans1629>
Tue, 29 Apr 2003 01:33:59 +0000 (01:33 +0000)
committerevans1629 <evans1629>
Tue, 29 Apr 2003 01:33:59 +0000 (01:33 +0000)
src/Headers/context.h
src/context.c
src/stateInfo.c

index 0af5595ed508005e0e824df7bc43744a0bb2e199..4d5929ec1866516f67bc7fa0fdfde55f9b1c9029 100644 (file)
@@ -331,29 +331,15 @@ extern void context_addAnnotation (/*@only@*/ annotationInfo)
 extern void context_addMetaState (/*@only@*/ cstring, /*@only@*/ metaStateInfo)
      /*@modifies internalState@*/ ;
 
-extern valueTable context_createValueTable (sRef p_s, /*@only@*/ stateInfo p_sinfo)
+extern valueTable context_createValueTable (sRef p_s, /*@only@*/ stateInfo p_info)
      /*@globals internalState@*/ ;
 
-extern valueTable context_createGlobalMarkerValueTable (/*@only@*/ stateInfo p_sinfo)
+extern valueTable context_createGlobalMarkerValueTable (/*@only@*/ stateInfo p_info)
      /*@globals internalState@*/ ;
 
 extern int context_getBugsLimit (void) /*@*/ ;
 # define context_getBugsLimit()  ((int)context_getValue(FLG_BUGSLIMIT))
 
-/*drl 12/30/2001 these are some ugly functions that were added to facilitate struct annotations */
-/*drl 1/6/2001: I didn't think these functions were solid enough to include in the
-  stable  release of splint.  I commented them out so that they won't break anything
-  but didn't delete them because they will be fixed and included later
-*/
-
-/*extern void  setGlobalStructInfo(ctype p_ct, constraintList p_list); */
-
-/*extern constraintList getInvariants (ctype p_ct); */
-
-/* static int getSref (ctype ct, sRef s); */
-
-/* sRef fixSref (ctype p_ct, sRef p_base, sRef p_fix); */
-
 extern ctype context_setLastStruct (/*@returned@*/ ctype p_s) /*@modifies internalState@*/;
 extern ctype context_getLastStruct (/*@returned@*/ /*ctype p_s*/) /*@modifies internalState@*/;
 
index b7fcc97fbb98cf8a1a5c6c5c7a76b9e6dd74ddff..08198343d56be3f27edc3572f57f5d43aa6b5531 100644 (file)
@@ -4795,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);
     }
 }
 
@@ -4837,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)
     {
@@ -4858,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
            {
@@ -4867,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)
     {
@@ -4894,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;
     }
 }
index 6d80a88a87d359d297309e860e3837caa40525cc..cf5246a9099d96fb0c7482076b841cfece9bfcc7 100644 (file)
@@ -87,32 +87,32 @@ void stateInfo_free (/*@only@*/ stateInfo a)
     }
 }
 
-static /*@observer@*/ stateInfo stateInfo_sort (/*@temp@*/ stateInfo sinfo)
+static /*@observer@*/ stateInfo stateInfo_sort (/*@temp@*/ stateInfo stinfo)
      /* Sorts in reverse location order */
 {
-  DPRINTF (("Sorting: %s", stateInfo_unparse (sinfo)));
+  DPRINTF (("Sorting: %s", stateInfo_unparse (stinfo)));
 
-  if (sinfo == NULL || sinfo->previous == NULL) 
+  if (stinfo == NULL || stinfo->previous == NULL) 
     {
-      return sinfo;
+      return stinfo;
     }
   else
     {
-      stateInfo snext = stateInfo_sort (sinfo->previous);
+      stateInfo snext = stateInfo_sort (stinfo->previous);
       stateInfo sfirst = snext;
 
-      DPRINTF (("sinfo/sext: %s // %s", stateInfo_unparse (sinfo), stateInfo_unparse (snext)));
+      DPRINTF (("stinfo/sext: %s // %s", stateInfo_unparse (stinfo), stateInfo_unparse (snext)));
       llassert (snext != NULL);
 
-      if (!fileloc_lessthan (sinfo->loc, snext->loc))
+      if (!fileloc_lessthan (stinfo->loc, snext->loc))
        {
-         /*@i2@*/ sinfo->previous = sfirst; /* spurious? */
-         DPRINTF (("Sorted ==> %s", stateInfo_unparse (sinfo)));
-         /*@i2@*/ return sinfo; /* spurious? */
+         /*@i2@*/ stinfo->previous = sfirst; /* spurious? */
+         DPRINTF (("Sorted ==> %s", stateInfo_unparse (stinfo)));
+         /*@i2@*/ return stinfo; /* spurious? */
        }
       else
        {
-         while (snext != NULL && fileloc_lessthan (sinfo->loc, snext->loc))
+         while (snext != NULL && fileloc_lessthan (stinfo->loc, snext->loc))
            {
              /*
              ** swap the order
@@ -121,22 +121,22 @@ static /*@observer@*/ stateInfo stateInfo_sort (/*@temp@*/ stateInfo sinfo)
              stateAction taction = snext->action;
              sRef tref = snext->ref;
              
-             DPRINTF (("in while: sinfo/sext: %s // %s", stateInfo_unparse (sinfo), stateInfo_unparse (snext)));
+             DPRINTF (("in while: stinfo/sext: %s // %s", stateInfo_unparse (stinfo), stateInfo_unparse (snext)));
       
-             snext->loc = sinfo->loc;
-             snext->action = sinfo->action;
+             snext->loc = stinfo->loc;
+             snext->action = stinfo->action;
              /*@-modobserver@*/
-             snext->ref = sinfo->ref; /* Doesn't actually modifie sfirst */ 
+             snext->ref = stinfo->ref; /* Doesn't actually modifie sfirst */ 
              /*@=modobserver@*/
              
-             sinfo->loc = tloc;
-             sinfo->action = taction;
-             sinfo->ref = tref;
+             stinfo->loc = tloc;
+             stinfo->action = taction;
+             stinfo->ref = tref;
              /*@-mustfreeonly@*/
-             sinfo->previous = snext->previous;
+             stinfo->previous = snext->previous;
              /*@=mustfreeonly@*/
              snext = snext->previous;
-             DPRINTF (("in while: sinfo/sext: %s // %s", stateInfo_unparse (sinfo), stateInfo_unparse (snext)));
+             DPRINTF (("in while: stinfo/sext: %s // %s", stateInfo_unparse (stinfo), stateInfo_unparse (snext)));
            }
          
          DPRINTF (("Sorted ==> %s", stateInfo_unparse (sfirst)));
This page took 0.092937 seconds and 5 git commands to generate.