]> andersk Git - splint.git/blobdiff - src/typeIdSet.c
noexpand always false.
[splint.git] / src / typeIdSet.c
index 37b2956016629bda532595a07b1c1faec7b6b20b..0bfb0369a6200679ad4001ea572d397de9f5198b 100644 (file)
@@ -1,6 +1,6 @@
 /*
-** LCLint - annotation-assisted static program checker
-** Copyright (C) 1994-2001 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)
 {
@@ -117,8 +119,6 @@ void typeIdSet_loadTable (FILE *fin)
       tistable_addDirectEntry (u);
       s = reader_readLine (fin, os, MAX_DUMP_LINE_LENGTH);
     }
-
-  /*@i32 free os? @*/
 }
   
 static void tistable_grow (void)
@@ -199,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)
@@ -210,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
     {
@@ -229,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)
This page took 0.239219 seconds and 4 git commands to generate.