/*
-** LCLint - annotation-assisted static program checker
-** Copyright (C) 1994-2000 University of Virginia,
+** Splint - annotation-assisted static program checker
+** Copyright (C) 1994-2003 University of Virginia,
** Massachusetts Institute of Technology
**
** This program is free software; you can redistribute it and/or modify it
** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
** MA 02111-1307, USA.
**
-** For information on lclint: lclint-request@cs.virginia.edu
-** To report a bug: lclint-bug@cs.virginia.edu
-** For more information: http://lclint.cs.virginia.edu
+** For information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
+** For more information: http://www.splint.org
*/
/*
** typeIdSet.c
*/
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
# include "basic.h"
/*@constant int TISTABLEBASESIZE;@*/
}
}
+# if 0
static /*@unused@*/ void tistable_printOut (void)
{
int i;
{
cstring s = usymIdSet_unparse (tistable[i]);
- fprintf (g_msgstream, "%d: %s\n", i, cstring_toCharsSafe (s));
+ fprintf (g_warningstream, "%d: %s\n", i, cstring_toCharsSafe (s));
cstring_free (s);
}
}
+# endif
void typeIdSet_loadTable (FILE *fin)
{
llassert (tistableentries == 1);
- s = fgets (s, MAX_DUMP_LINE_LENGTH, fin);
+ s = reader_readLine (fin, s, MAX_DUMP_LINE_LENGTH);
while (s != NULL && *s != ';')
{
llassert (*s == '\0' || *s == '\n');
tistable_addDirectEntry (u);
- s = fgets (os, MAX_DUMP_LINE_LENGTH, fin);
+ s = reader_readLine (fin, os, MAX_DUMP_LINE_LENGTH);
}
}
bool typeIdSet_member (typeIdSet t, typeId el)
{
usymIdSet u = tistable_fetch (t);
-
- return usymIdSet_member (u, el);
+ return usymIdSet_member (u, typeId_toUsymId (el));
}
bool typeIdSet_isEmpty (typeIdSet t)
typeIdSet typeIdSet_single (typeId t)
{
- return (tistable_addEntry (usymIdSet_single (t)));
+ return (tistable_addEntry (usymIdSet_single (typeId_toUsymId (t))));
}
typeIdSet typeIdSet_singleOpt (typeId t)
{
if (typeId_isValid (t))
{
- return (tistable_addEntry (usymIdSet_single (t)));
+ return (tistable_addEntry (usymIdSet_single (typeId_toUsymId (t))));
}
else
{
{
usymIdSet u = tistable_fetch (t);
- if (usymIdSet_member (u, el))
+ if (usymIdSet_member (u, typeId_toUsymId (el)))
{
return t;
}
else
{
- return (tistable_addEntry (usymIdSet_add (u, el)));
+ return (tistable_addEntry (usymIdSet_add (u, typeId_toUsymId (el))));
}
}
typeIdSet typeIdSet_removeFresh (typeIdSet t, typeId el)
{
- return (tistable_addEntry (usymIdSet_removeFresh (tistable_fetch (t), el)));
+ return (tistable_addEntry (usymIdSet_removeFresh (tistable_fetch (t), typeId_toUsymId (el))));
}
cstring typeIdSet_unparse (typeIdSet t)
int i;
- i = getInt (s);
+ i = reader_getInt (s);
llassert (i >= 0 && i < tistableentries);
return (typeIdSet) i;