]> andersk Git - splint.git/blobdiff - src/cppmain.c
Pushed back constraintResolve.c to the previous version.
[splint.git] / src / cppmain.c
index b05ddc437687db37f11978ffa34667d1ef4eea19..7cd4a0a79db8b4f70351a2db2e77910b0f408d27 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
@@ -89,6 +89,12 @@ void cppReader_initMod ()
   /*@-compdef@*/ /* g_cppState is not yet innitialized */
 } /*@=compdef@*/
 
+void cppReader_destroyMod () 
+  /*@globals killed g_cppState@*/
+{
+  cppCleanup (&g_cppState);
+}
+
 void cppReader_initialize ()
 {
   cpplib_initializeReader (&g_cppState);
@@ -137,6 +143,8 @@ int cppProcess (/*@dependent@*/ cstring infile,
 
       if (!opts->no_output)
        {
+         DPRINTF (("Writing: %s", cstring_copyLength (g_cppState.token_buffer, cpplib_getWritten (&g_cppState))));
+
          (void) fwrite (g_cppState.token_buffer, (size_t) 1,
                         cpplib_getWritten (&g_cppState), ofile);
        }
@@ -183,12 +191,8 @@ void cppAddIncludeDir (cstring dir)
     } 
   else 
     {
-      /* -I option (Add directory to include path) */
       struct file_name_list *dirtmp = (struct file_name_list *) dmalloc (sizeof (*dirtmp));
       
-      llassert (cstring_firstChar (dir) == 'I');
-      dir = cstring_suffix (dir, 1);
-
       DPRINTF (("Add include: %s", dir));
 
       dirtmp->next = 0;                /* New one goes on the end */
This page took 0.036352 seconds and 4 git commands to generate.