]> andersk Git - splint.git/blobdiff - src/constraint.c
Fix bug in fileloc_compare which was causeing problem in constraint sorting.
[splint.git] / src / constraint.c
index 891110a2923243671ce96ea77d49085f5a6bad19..c20a9cd1020454b556b0038de0e36160c6ccebfe 100644 (file)
@@ -716,6 +716,22 @@ void constraint_printErrorPostCondition (constraint c, fileloc loc)
     }
 }
 
+ /*drl added 8-11-001*/
+cstring constraint_printLocation (/*@observer@*/ /*@temp@*/ constraint c) /*@*/
+{
+  cstring string, ret;
+  fileloc errorLoc;
+  
+  string = constraint_print(c);
+
+  errorLoc = constraint_getFileloc(c);
+
+  ret = message ("constraint: %q @ %q", string, fileloc_unparse(errorLoc) );
+
+  fileloc_free(errorLoc);
+  return ret;
+
+}
 
 
 
@@ -737,7 +753,7 @@ void constraint_printError (constraint c, fileloc loc)
   else
     {
       llassert(FALSE);
-      DPRINTF(( message("constraint %s had undefined fileloc %s", constraint_print(c), fileloc_unparse(temp) ) ));
+      TPRINTF(( message("constraint %s had undefined fileloc %s", constraint_print(c), fileloc_unparse(temp) ) ));
       fileloc_free(temp);
       errorLoc = fileloc_copy(errorLoc);
     }
@@ -1123,7 +1139,7 @@ void constraint_dump (/*@observer@*/ constraint c,  FILE *f)
 }
 
 
-int constraint_compare (/*@observer@*/ /*@temp@*/ constraint * c1, /*@observer@*/ /*@temp@*/ constraint * c2) /*@*/
+int constraint_compare (/*@observer@*/ /*@temp@*/ const constraint * c1, /*@observer@*/ /*@temp@*/ const constraint * c2) /*@*/
 {
   fileloc loc1, loc2;
 
This page took 0.040698 seconds and 4 git commands to generate.