]> andersk Git - splint.git/blobdiff - src/filelocList.c
noexpand always false.
[splint.git] / src / filelocList.c
index b011a01094f6c2f25684bfb68704fa1de76475be..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
@@ -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.033465 seconds and 4 git commands to generate.