]> andersk Git - splint.git/blob - lib/bool.h
Fixed -help <mode> bug.
[splint.git] / lib / bool.h
1 #ifndef BOOL_H
2 #define BOOL_H
3
4 #ifndef FALSE
5 #define FALSE 0
6 #endif
7
8 #ifndef TRUE
9 #define TRUE (!FALSE)
10 #endif
11
12 /* bool is a keyword in C++ */
13 /*@-cppnames@*/
14 typedef int bool;
15 /*@=cppnames@*/
16
17 /*
18 ** bool_initMod has no real effect
19 ** Declared with modifies internalState, so no warnings about no effects are 
20 ** reported when it is called.
21 */
22
23 extern /*@unused@*/ void bool_initMod (void) /*@modifies internalState@*/ ;
24 /*@-mustmod@*/
25 # define bool_initMod()
26 /*@=mustmod@*/
27
28 extern /*@unused@*/ /*@observer@*/ char *bool_unparse (bool) /*@*/ ;
29 # define bool_unparse(b) ((b) ? "true" : "false" )
30
31 extern /*@unused@*/ bool bool_not (bool) /*@*/ ;
32 # define bool_not(b) ((b) ? FALSE : TRUE)
33
34 extern /*@unused@*/ bool bool_equal (bool, bool) /*@*/ ;
35 # define bool_equal(a,b) ((a) ? (b) : !(b))
36
37 # endif
This page took 0.038461 seconds and 5 git commands to generate.