File: bool.h

package info (click to toggle)
tin 981002-2
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 3,088 kB
  • ctags: 4,969
  • sloc: ansic: 46,800; sh: 1,655; makefile: 1,144; yacc: 699; perl: 103
file content (23 lines) | stat: -rw-r--r-- 535 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef BOOL_H
#	define BOOL_H 1

#	ifndef FALSE
#		define FALSE 0
#	endif

#	ifndef TRUE
#		define TRUE (!FALSE)
#	endif

typedef unsigned t_bool;	/* don't make this a char or short! */

extern /*@unused@*/ t_bool bool_equal (t_bool, t_bool) /*@*/ ;
#	define bool_equal(a,b) ((a) ? (b) : !(b))

extern /*@unused@*/ t_bool bool_not (t_bool) /*@*/ ;
#	define bool_not(b) ((b) ? FALSE : TRUE)

extern /*@unused@*/ /*@observer@*/ char *bool_unparse (t_bool) /*@*/ ;
#	define bool_unparse(b) ((b) ? "TRUE" : "FALSE")

#endif /* !BOOL_H */