]> andersk Git - splint.git/blobdiff - src/lcllib.c
Fixed all /*@i...@*/ tags (except 1).
[splint.git] / src / lcllib.c
index cc7d66135a8088c5d3de6f223aa760ceee6b7502..1cfe85f8c4e4cb705b1a6348ef23fe8f25c3ee49 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
  */
 
 # include "splintMacros.nf"
-# include "llbasic.h"
+# include "basic.h"
 # include "osd.h"
+# include "version.h"
 
-# ifndef NOLCL
 # include "gram.h"
-
 # include "lclscan.h"
-# endif
 
 # include "lcllib.h"
 # include "llmain.h"
@@ -229,11 +227,10 @@ lcllib_isSkipHeader (cstring sname)
              /*@-nullstate@*/ 
              return TRUE; 
              /*@=nullstate@*/
-             /*@i233@*/
+
              /* evans 2002-03-02: 
-                the returned reference is possibly null,
-                but this should not change the null state of the parameter
-                investigate this warning 
+                  the returned reference is possibly null,
+                  but this should not change the null state of the parameter
              */
            }
        }
@@ -258,7 +255,7 @@ lcllib_isSkipHeader (cstring sname)
 
   cstring_free (xname);
   /*@noaccess cstring@*/
-  /*@-nullstate@*/ /*@i233@*/ /* same problem as above */
+  /*@-nullstate@*/ /* same problem as above */
   return FALSE;
   /*@=nullstate@*/
 }
@@ -274,7 +271,7 @@ dumpState (cstring cfname)
   FILE *f;
   cstring fname = fileLib_addExtension (cfname, cstring_makeLiteralTemp (DUMP_SUFFIX));
   
-  f = fileTable_openFile (context_fileTable (), fname, "w");
+  f = fileTable_openWriteFile (context_fileTable (), fname);
 
   displayScanOpen (message ("Dumping to %s ", fname)); 
   
@@ -304,7 +301,7 @@ dumpState (cstring cfname)
       */
 
       fprintf (f, "%s %s\n", LIBRARY_MARKER, cstring_toCharsSafe (fname));
-      fprintf (f, ";;%s\n", SPLINT_VERSION);
+      fprintf (f, ";;Splint %f\n", SPLINT_LIBVERSION);
       fprintf (f, ";;lib:%d\n", (int) context_getLibrary ());
       fprintf (f, ";;ctTable\n");
       
@@ -355,7 +352,7 @@ loadStandardState ()
     }
   else
     {
-      stdlib = fileTable_openFile (context_fileTable (), fpath, "r");
+      stdlib = fileTable_openReadFile (context_fileTable (), fpath);
 
       if (stdlib == NULL)
        {
@@ -405,7 +402,7 @@ loadStandardState ()
              sfree (ot);
              
              check (fileTable_closeFile (context_fileTable (), stdlib));
-             stdlib = fileTable_openFile (context_fileTable (), fpath, "r");
+             stdlib = fileTable_openReadFile (context_fileTable (), fpath);
            }
 
          llassert (stdlib != NULL);
@@ -486,10 +483,13 @@ loadLCDFile (FILE *f, cstring name)
                  vname = cstring_fromChars (buf + 9);
 
                  loadllmsg (message ("Load library %s is in obsolete Splint library "
-                                     "format (version %s).  Attempting "
+                                     "format (version %f (%s), expecting version %f).  Attempting "
                                      "to continue anyway, but results may be incorrect.  Rebuild "
                                      "the library with this version of splint.", 
-                                     name, vname));
+                                     name, 
+                                     version,
+                                     vname, 
+                                     SPLINT_LIBVERSION));
                }
              else
                {
@@ -569,7 +569,7 @@ loadState (cstring cfname)
   FILE *f;
   cstring fname = fileLib_addExtension (cfname, cstring_makeLiteralTemp (DUMP_SUFFIX));
 
-  f = fileTable_openFile (context_fileTable (), fname, "r");
+  f = fileTable_openReadFile (context_fileTable (), fname);
 
   if (f == NULL)
     {
This page took 0.037297 seconds and 4 git commands to generate.