]> andersk Git - splint.git/blobdiff - src/Headers/bool.h
Making fixes for Microsoft Visual C++ compiler.
[splint.git] / src / Headers / bool.h
index 23f5ea9883e3ae9244303fa43649e4ffc39fb506..d0e0be551ceafba39fe673bb0a1595b079b0a16c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
+** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
 ** See ../LICENSE for license information.
 **
 */
@@ -7,12 +7,26 @@
 
 # define BOOL_H
 
+# ifdef WIN32
 # ifndef FALSE
+/*@constant bool FALSE=false@*/
 # define FALSE 0
 # endif
 
 # ifndef TRUE
-# define TRUE (! FALSE)
+/*@constant bool TRUE=true@*/
+# define TRUE (!FALSE)
+# endif
+# else
+# ifndef FALSE
+/*@constant bool FALSE=false@*/
+# define FALSE false
+# endif
+
+# ifndef TRUE
+/*@constant bool TRUE=true@*/
+# define TRUE true
+# endif
 # endif
 
 extern /*@observer@*/ cstring bool_unparse (bool p_b) /*@*/ ;
@@ -23,6 +37,11 @@ extern int bool_compare (bool p_b1, bool p_b2) /*@*/ ;
 extern bool bool_fromInt (int p_i) /*@*/ ;
 extern int bool_toInt (bool p_b) /*@*/ ;
 
+extern bool bool_isReasonable (/*@sef@*/ bool p_b) /*@*/ ;
+/*@-boolcompare@*/
+# define bool_isReasonable(b) (((b) == TRUE) || ((b) == FALSE))
+/*@=boolcompare@*/
+
 # define bool_unparse(b)   (cstring_makeLiteralTemp ((b) ? "true" : "false" ))
 # define bool_dump(b)      (cstring_makeLiteralTemp ((b) ? "1" : "0" ))
 # define bool_not(b)       ((b) ? FALSE : TRUE)
This page took 3.334575 seconds and 4 git commands to generate.