]> andersk Git - splint.git/blob - test/db3/bool.h
e1134d6b1587e7b72e02836e439fa45983bb9ec8
[splint.git] / test / db3 / 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 /*@-cppnames@*/
12 typedef int bool;
13 /*@=cppnames@*/
14 /*
15 ** bool_initMod has no real effect
16 ** Declared with modifies internalState, so no noeffect errors are 
17 ** reported when it is called.)
18 */
19
20 extern /*@unused@*/ void bool_initMod (void)
21   /*@globals internalState@*/ /*@modifies internalState@*/ ;
22 /*@-mustmod@*/
23 # define bool_initMod() do { ; } while (FALSE)
24 /*@=mustmod@*/
25
26 extern /*@unused@*/ /*@observer@*/ char *bool_unparse (bool) /*@*/ ;
27 # define bool_unparse(b) ((b) ? "true" : "false" )
28
29 extern /*@unused@*/ bool bool_not (bool) /*@*/ ;
30 # define bool_not(b) ((b) ? FALSE : TRUE)
31
32 extern /*@unused@*/ bool bool_equal (bool, bool) /*@*/ ;
33 # define bool_equal(a,b) ((a) ? (b) : !(b))
34
35 /*@noaccess bool@*/
36 extern /*@falseexit@*/ void check (bool);
37 # define check(x) \
38   do { bool m_res = x; assert (m_res); } while (FALSE)
39
40 # endif
This page took 0.027115 seconds and 3 git commands to generate.