]> andersk Git - splint.git/blame - test/db1/bool.h
Added support for ISO C99 _Bool and stdbool bool/true/false. The
[splint.git] / test / db1 / bool.h
CommitLineData
885824d3 1#ifndef BOOL_H
2#define BOOL_H
3
4#ifndef FALSE
0bd4c301 5#define FALSE false
885824d3 6#endif
7
8#ifndef TRUE
0bd4c301 9#define TRUE true
885824d3 10#endif
11/*@-cppnames@*/
12typedef 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
20extern /*@unused@*/ void bool_initMod (void) /*@modifies internalState@*/ ;
21/*@-mustmod@*/
22# define bool_initMod()
23/*@=mustmod@*/
24
25extern /*@unused@*/ /*@observer@*/ char *bool_unparse (bool) /*@*/ ;
26# define bool_unparse(b) ((b) ? "true" : "false" )
27
28extern /*@unused@*/ bool bool_not (bool) /*@*/ ;
29# define bool_not(b) ((b) ? FALSE : TRUE)
30
31extern /*@unused@*/ bool bool_equal (bool, bool) /*@*/ ;
32# define bool_equal(a,b) ((a) ? (b) : !(b))
33
34# endif
This page took 0.078806 seconds and 5 git commands to generate.