]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | #ifndef BOOL_H |
2 | #define BOOL_H | |
3 | ||
4 | /*@-cppnames@*/ | |
5 | /*@-exporttype@*/ | |
cc78dedd | 6 | typedef /*@abstract@*/ int bool; |
885824d3 | 7 | /*@=exporttype@*/ |
8 | /*@=cppnames@*/ | |
9 | ||
10 | #ifndef FALSE | |
11 | /*@constant unused bool FALSE@*/ | |
0bd4c301 | 12 | #define FALSE false |
885824d3 | 13 | #endif |
14 | ||
15 | #ifndef TRUE | |
16 | /*@constant unused bool TRUE@*/ | |
0bd4c301 | 17 | #define TRUE true |
885824d3 | 18 | #endif |
19 | ||
20 | /*@-slovakfcns@*/ | |
0bd4c301 | 21 | extern /*@unused@*/ void bool_initMod (void); |
885824d3 | 22 | # define bool_initMod() |
23 | ||
0bd4c301 | 24 | extern /*@unused@*/ /*@observer@*/ char *bool_unparse (bool); |
885824d3 | 25 | # define bool_unparse(b) ((b) ? "true" : "false" ) |
26 | ||
0bd4c301 | 27 | extern /*@unused@*/ bool bool_not (bool); |
885824d3 | 28 | # define bool_not(b) ((b) ? FALSE : TRUE) |
29 | ||
0bd4c301 | 30 | extern /*@unused@*/ bool bool_equal (bool, bool); |
885824d3 | 31 | # define bool_equal(a,b) ((a) ? (b) : !(b)) |
32 | /*@=slovakfcns@*/ | |
33 | ||
34 | # endif |