]> andersk Git - splint.git/blame - lib/bool.h
Committing Evans's update of man page to fix problems reported by ESR.
[splint.git] / lib / bool.h
CommitLineData
885824d3 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@*/
14typedef int bool;
15/*@=cppnames@*/
16
17/*
18** bool_initMod has no real effect
6fcd0b1e 19** Declared with modifies internalState, so no warnings about no effects are
20** reported when it is called.
885824d3 21*/
22
23extern /*@unused@*/ void bool_initMod (void) /*@modifies internalState@*/ ;
24/*@-mustmod@*/
25# define bool_initMod()
26/*@=mustmod@*/
27
28extern /*@unused@*/ /*@observer@*/ char *bool_unparse (bool) /*@*/ ;
29# define bool_unparse(b) ((b) ? "true" : "false" )
30
31extern /*@unused@*/ bool bool_not (bool) /*@*/ ;
32# define bool_not(b) ((b) ? FALSE : TRUE)
33
34extern /*@unused@*/ bool bool_equal (bool, bool) /*@*/ ;
35# define bool_equal(a,b) ((a) ? (b) : !(b))
36
37# endif
This page took 0.056634 seconds and 5 git commands to generate.