Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Do you #define booleans?

Name: MILKRIBS4k 2009-06-23 7:30

Do you? What's wrong with simple one and zero?

Name: Anonymous 2009-06-24 2:51

>>25
/* believe it or not but the Single Unix Specification actually
 * specifies this header, see
 * http://www.opengroup.org/onlinepubs/007904975/basedefs/stdbool.h.html */
it's C that specifies it, not SUS.

>>25
get a better operating system.
no GNU bloat here:
/* $MirOS: src/include/stdbool.h,v 1.2 2007/09/21 10:43:36 tg Exp $ */
/* $OpenBSD: stdbool.h,v 1.3 2004/10/02 12:55:31 espie Exp $ */

/*
 * Written by Marc Espie, September 25, 1999
 * Public domain.
 */

#ifndef    _STDBOOL_H_
#define    _STDBOOL_H_   

#ifndef __cplusplus

#if (defined(__GNUC__) && __GNUC__ >= 3) || defined(__PCC__)
/* Support for _C99: type _Bool is already built-in. */
#define false    0
#define true    1

#else
/* `_Bool' type must promote to `int' or `unsigned int'. */
typedef enum {
    false = 0,
    true = 1
} _Bool;

/* And those constants must also be available as macros. */
#define    false    false
#define    true    true

#endif

/* User visible type `bool' is provided as a macro which may be redefined */
#define bool _Bool

#else /* __cplusplus */
#define _Bool     bool
#define bool     bool
#define false     false
#define true     true
#endif /* __cplusplus */

/* Inform that everything is fine */
#define __bool_true_false_are_defined 1

#endif /* _STDBOOL_H_ */

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List