]> andersk Git - splint.git/blobdiff - src/functionConstraint.c
Pushed back constraintResolve.c to the previous version.
[splint.git] / src / functionConstraint.c
index 859434e9106237abe42c8e57029c6b82fe3a28cb..96bfff88dedaccc388116d62aeefe8a02a7ad597 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ** Splint - annotation-assisted static program checker
-** Copyright (C) 1994-2002 University of Virginia,
+** Copyright (C) 1994-2003 University of Virginia,
 **         Massachusetts Institute of Technology
 **
 ** This program is free software; you can redistribute it and/or modify it
@@ -219,11 +219,36 @@ extern void functionConstraint_free (/*@only@*/ functionConstraint node)
     }
 }
 
+/*drl modified */
+void functionConstraint_addBufferConstraints (functionConstraint node, constraintList clist) 
+{
+  constraintList temp;
 
-
-
-
-
-
-
-
+  temp = constraintList_copy (clist);
+  
+  if (functionConstraint_isDefined (node))
+    {
+      if (node->kind == FCT_CONJUNCT)
+       {
+         functionConstraint_addBufferConstraints (node->constraint.conjunct.op1, constraintList_copy(temp) );
+         functionConstraint_addBufferConstraints (node->constraint.conjunct.op2,temp);
+       }
+      else
+       {
+         if (node->kind == FCT_BUFFER)
+           {
+             node->constraint.buffer = constraintList_addListFree(node->constraint.buffer, temp);
+           }
+         else
+           {
+             constraintList_free (temp);
+             return;
+           }
+       }
+    }
+  else
+    {
+      constraintList_free (temp);
+      return;
+    }
+}
This page took 0.102973 seconds and 4 git commands to generate.