X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=includes%2Fstdbool.h;h=6e9c83f07acaad0fdfea42e394c49abbb30e1297;hp=734a52dd99733fde260901db7ad395f2306fd3bf;hb=1d9d92ba957a0b8307c9a65c35867fde68e6533b;hpb=1e221deb9ee725a14b3656f94e2763f8faeb18dc diff --git a/includes/stdbool.h b/includes/stdbool.h index 734a52d..6e9c83f 100644 --- a/includes/stdbool.h +++ b/includes/stdbool.h @@ -1,15 +1,35 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- -// TODO -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------------- + * Public Domain C Library - http://pdclib.sourceforge.net + * This code is Public Domain. Use, modify, and redistribute at will. + * ---------------------------------------------------------------------------- + * Boolean type and values + * ---------------------------------------------------------------------------- + * This header is part of a freestanding implementation + * --------------------------------------------------------------------------*/ -#ifndef __STDBOOL_H -#define __STDBOOL_H __STDBOOL_H +#ifndef _STDBOOL_H +#define _STDBOOL_H _STDBOOL_H -// TODO +/* ---------------------------------------------------------------------------- + * MACROS + * --------------------------------------------------------------------------*/ -#endif // __STDBOOL_H +#define __bool_true_false_are_defined 1 + +#ifndef __cplusplus + +#define bool _Bool +#define false 0 +#define true 1 + +/* ---------------------------------------------------------------------------- + * TYPEDEFS + * --------------------------------------------------------------------------*/ + +typedef int bool; + +#endif /* __cplusplus */ + +#endif /* _STDBOOL_H */