FILE *f;
cstring fname = fileLib_addExtension (cfname, cstring_makeLiteralTemp (DUMP_SUFFIX));
- f = fopen (cstring_toCharsSafe (fname), "w");
+ f = fileTable_openFile (context_fileTable (), fname, "w");
if (context_getFlag (FLG_SHOWSCAN))
{
fprintf (f, ";; Modules access\n");
context_dumpModuleAccess (f);
fprintf (f, ";;End\n");
- check (fclose (f) == 0);
+ check (fileTable_closeFile (context_fileTable (), f));
}
if (context_getFlag (FLG_SHOWSCAN))
}
else
{
- stdlib = fopen (cstring_toCharsSafe (fpath), "r");
+ stdlib = fileTable_openFile (context_fileTable (), fpath, "r");
if (stdlib == NULL)
{
sfree (ot);
- check (fclose (stdlib) == 0);
- stdlib = fopen (cstring_toCharsSafe (fpath), "r");
+ check (fileTable_closeFile (context_fileTable (), stdlib));
+ stdlib = fileTable_openFile (context_fileTable (), fpath, "r");
}
llassert (stdlib != NULL);
result = loadLCDFile (stdlib, fpath);
}
- check (fclose (stdlib) == 0);
+ check (fileTable_closeFile (context_fileTable (), stdlib));
}
}
FILE *f;
cstring fname = fileLib_addExtension (cfname, cstring_makeLiteralTemp (DUMP_SUFFIX));
- f = fopen (cstring_toCharsSafe (fname), "r");
+ f = fileTable_openFile (context_fileTable (), fname, "r");
if (f == NULL)
{
}
}
- check (fclose (f) == 0);
+ check (fileTable_closeFile (context_fileTable (), f));
}
/* usymtab_printAll (); */