/*
** 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 "llmain.h"
/*@constant int MCEBASESIZE;@*/
for (i = 0; i < s->entries; i++)
{
- /*drl bee: si*/ mce_free (s->contents[i]);
+ mce_free (s->contents[i]);
}
sfree (s->contents);
for (i = 0; i < s->entries; i++)
{
- /*drl bee: dm*/ /*drl bee: si*/ s->contents[i] = oldcontents[i];
+ s->contents[i] = oldcontents[i];
}
sfree (oldcontents);
if ((i = macrocache_exists (s, fl)) != DNE)
{
- /*drl bee: si*/ if (cstring_equal (def, s->contents[i]->def))
+ if (cstring_equal (def, s->contents[i]->def))
{
fileloc_free (fl);
cstring_free (def);
*/
cstring_free (s->contents[i]->def);
- /*drl bee: si*/ s->contents[i]->def = def;
+ s->contents[i]->def = def;
fileloc_free (fl);
return;
}
s->nspace--;
- /*drl bee: si*/ s->contents[s->entries] = mce_create (fl, def, sup);
+ s->contents[s->entries] = mce_create (fl, def, sup);
s->entries++;
}
void
macrocache_addComment (macrocache s, /*@only@*/ fileloc fl, /*@only@*/ cstring def)
{
- DPRINTF (("Add comment: %s / %s", fileloc_unparse (fl), def));
+ DPRINTF (("Macrocache add comment: %s / %s", fileloc_unparse (fl), def));
macrocache_addGenEntry (s, fl, def, TRUE);
}
for (i = 0; i < s->entries; i++)
{
- /*drl bee: si*/ if (fileloc_equal (s->contents[i]->fl, fl))
+ if (fileloc_equal (s->contents[i]->fl, fl))
return (i);
}
for (i = 0; i < m->entries; i++)
{
- /*drl bee: si*/ fileloc fl = m->contents[i]->fl;
+ fileloc fl = m->contents[i]->fl;
cstring def = m->contents[i]->def;
bool defined = m->contents[i]->defined;
mtid = fileTable_addMacrosFile (context_fileTable ());
fname = fileTable_fileName (mtid);
- s_macFile = fileTable_openFile (context_fileTable (), fname, "wb+");
+ s_macFile = fileTable_createMacrosFile (context_fileTable (), fname); /* , "wb+"); ? **/
if (s_macFile == NULL)
{
static void
macrocache_processMacro (macrocache m, int i)
{
- /*drl bee: si*/ fileloc fl = m->contents[i]->fl;
+ fileloc fl = m->contents[i]->fl;
- /*drl bee: si*/ m->contents[i]->defined = TRUE;
+ m->contents[i]->defined = TRUE;
if (!fileId_equal (currentFile (), fileloc_fileId (fl)))
{
{
for (i = 0; i < m->entries; i++)
{
- /*drl bee: si*/ if (m->contents[i]->defined)
+ if (m->contents[i]->defined)
{
;
}
}
else
{
- if (context_getFlag (FLG_SHOWSCAN))
+ if (!fileloc_isLib (fl))
{
- if (!fileloc_isLib (fl))
- {
- lldiagmsg (message ("< checking macros %q >",
- fileloc_outputFilename (fl)));
- }
+ displayScan (message ("checking macros %q",
+ fileloc_outputFilename (fl)));
}
lastfl = fl;
for (i = 0; i < m->entries; i++)
{
- /*drl bee: si*/ if (m->contents[i]->defined)
+ if (m->contents[i]->defined)
{
;
}