# include "splintMacros.nf"
# include "llbasic.h"
# include "osd.h"
+# include "version.h"
-# ifndef NOLCL
# include "gram.h"
-
# include "lclscan.h"
-# endif
# include "lcllib.h"
# include "llmain.h"
return TRUE;
}
- if (context_getFlag (FLG_SKIPANSIHEADERS)
+ if (context_getFlag (FLG_SKIPISOHEADERS)
&& context_usingAnsiLibrary ())
{
if (context_getFlag (FLG_SKIPPOSIXHEADERS))
{
cstring_free (xname);
- return TRUE;
+ /*@-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
+ */
}
}
else
cstring_free (xname);
/*@noaccess cstring@*/
+ /*@-nullstate@*/ /*@i233@*/ /* same problem as above */
return FALSE;
+ /*@=nullstate@*/
}
static void printDot (void)
{
- if (context_getFlag (FLG_SHOWSCAN))
- {
- (void) fflush (g_msgstream);
- fprintf (stderr, ".");
- (void) fflush (stderr);
- }
+ displayScanContinue (cstring_makeLiteralTemp ("."));
}
void
FILE *f;
cstring fname = fileLib_addExtension (cfname, cstring_makeLiteralTemp (DUMP_SUFFIX));
- f = fileTable_openFile (context_fileTable (), fname, "w");
+ f = fileTable_openWriteFile (context_fileTable (), fname);
- if (context_getFlag (FLG_SHOWSCAN))
- {
- fprintf (stderr, "< Dumping to %s ", cstring_toCharsSafe (fname));
- }
+ displayScanOpen (message ("Dumping to %s ", fname));
if (f == NULL)
{
check (fileTable_closeFile (context_fileTable (), f));
}
- if (context_getFlag (FLG_SHOWSCAN))
- {
- fprintf (g_msgstream, " >\n");
- }
-
+ displayScanClose ();
cstring_free (fname);
}
}
else
{
- stdlib = fileTable_openFile (context_fileTable (), fpath, "r");
+ stdlib = fileTable_openReadFile (context_fileTable (), fpath);
if (stdlib == NULL)
{
sfree (ot);
check (fileTable_closeFile (context_fileTable (), stdlib));
- stdlib = fileTable_openFile (context_fileTable (), fpath, "r");
+ stdlib = fileTable_openReadFile (context_fileTable (), fpath);
}
llassert (stdlib != NULL);
DPRINTF (("Loading: %s", fpath));
- if (context_getDebug (FLG_SHOWSCAN))
- {
- fprintf (g_msgstream, "< loading standard library %s ",
- cstring_toCharsSafe (fpath));
- result = loadLCDFile (stdlib, fpath);
- fprintf (g_msgstream, " >\n");
- }
- else
- {
- result = loadLCDFile (stdlib, fpath);
- }
+ displayScanOpen (message ("loading standard library %s ", fpath));
+ result = loadLCDFile (stdlib, fpath);
+ displayScanClose ();
check (fileTable_closeFile (context_fileTable (), stdlib));
}
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)
{
- if (context_getDebug (FLG_SHOWSCAN))
- fprintf (g_msgstream, " >\n");
-
+ displayScanClose ();
llfatalerror (message ("Cannot open dump file for loading: %s",
fname));
}