]> andersk Git - splint.git/blobdiff - src/filelocList.c
Pushed back constraintResolve.c to the previous version.
[splint.git] / src / filelocList.c
index 6d0ff21ce6a117e158537486272bdb2fbd497541..8897264649ec13735a0ffb5b9ce5911668dbe85f 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
@@ -17,8 +17,8 @@
 ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 ** MA 02111-1307, USA.
 **
-** For information on splint: splint@cs.virginia.edu
-** To report a bug: splint-bug@cs.virginia.edu
+** For information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
 ** For more information: http://www.splint.org
 */
 /*
@@ -215,10 +215,11 @@ int filelocList_realSize (filelocList s)
 cstring filelocList_unparseUses (filelocList s)
 {
   int i;
-  int linelen = 0;
+  size_t linelen = 0;
   int maxlen = context_getLineLen () - 3;
   cstring st = cstring_undefined;
   fileId lastFile = fileId_invalid;
+  bool parenFormat = context_getFlag (FLG_PARENFILEFORMAT); 
 
   if (filelocList_isDefined (s))
     {
@@ -239,7 +240,7 @@ cstring filelocList_unparseUses (filelocList s)
                {
                  if (fileId_equal (fileloc_fileId (s->elements[i]), lastFile))
                    {
-                     if (linelen + 7 > maxlen)
+                     if (linelen + 7 > size_fromInt (maxlen))
                        {
                          st = message ("%q\n      ", st);
                          linelen = 6;
@@ -249,9 +250,19 @@ cstring filelocList_unparseUses (filelocList s)
                          st = message ("%q, ", st);
                        }
                      
-                     st = message ("%q%d,%d", 
-                                   st, fileloc_lineno (s->elements[i]), 
-                                   fileloc_column (s->elements[i]));
+                     if (parenFormat)
+                       {
+                         st = message ("%q(%d,%d)", 
+                                       st, fileloc_lineno (s->elements[i]), 
+                                       fileloc_column (s->elements[i]));
+                       }
+                     else
+                       {
+                         st = message ("%q%d:%d", 
+                                       st, fileloc_lineno (s->elements[i]), 
+                                       fileloc_column (s->elements[i]));
+                       }
+                     
                      linelen += 3 + int_log (fileloc_lineno (s->elements[i])) 
                        + int_log (fileloc_column (s->elements[i]));
                    }
This page took 0.03403 seconds and 4 git commands to generate.