]> andersk Git - splint.git/blobdiff - src/typeIdSet.c
Fixed all /*@i...@*/ tags (except 1).
[splint.git] / src / typeIdSet.c
index 1489d83223c09e10c231d5a8e758bdaa6c56a126..0bfb0369a6200679ad4001ea572d397de9f5198b 100644 (file)
@@ -1,6 +1,6 @@
 /*
-** 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;@*/
@@ -82,6 +82,7 @@ void typeIdSet_dumpTable (FILE *fout)
     }
 }
 
+# if 0
 static /*@unused@*/ void tistable_printOut (void)
 {
   int i;
@@ -94,10 +95,11 @@ static /*@unused@*/ void tistable_printOut (void)
     {
       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)
 {
@@ -106,7 +108,7 @@ 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 != ';')
     {
@@ -115,7 +117,7 @@ void typeIdSet_loadTable (FILE *fin)
       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);
     }
 }
   
@@ -197,8 +199,7 @@ typeIdSet typeIdSet_emptySet (void)
 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)
@@ -208,14 +209,14 @@ 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
     {
@@ -227,19 +228,19 @@ typeIdSet typeIdSet_insert (typeIdSet t, typeId el)
 {
   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)
@@ -275,7 +276,7 @@ typeIdSet typeIdSet_undump (char **s)
   int i;
 
   
-  i = getInt (s);
+  i = reader_getInt (s);
 
   llassert (i >= 0 && i < tistableentries);
   return (typeIdSet) i;
This page took 0.040107 seconds and 4 git commands to generate.