cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl internal bool TRUE and FALSE definitions and usage

From: Tor Arntsen <tor_at_spacetec.no>
Date: Sun, 16 Dec 2012 12:22:00 +0100

[HP TRUE/FALSE discussion]

Maybe I'm overlooking something, but I have never had problems with
this: In my applications, and at work, I simply use
#undef TRUE
#undef FALSE
#define TRUE 1
#define FALSE 0
unconditionally. I do this after all the system header files have been
included. At that point it should not matter much, if at all, for the
header files. And, if there is a header macro which invokes another
#define, in this case TRUE or FALSE, and that first macro is invoked
in your code, it should not matter even if TRUE was different (e.g. -1
vs. 1). In C 'false' is defined as 0, and 'true' is anything that
isn't 'false', i.e. different from zero.

-Tor

CONFIDENTIALITY
This e-mail and any attachment contain KONGSBERG information which may be
proprietary, confidential or subject to export regulations, and is only meant
for the intended recipient(s). Any disclosure, copying, distribution or use is
prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in
error, please delete it immediately from your system and notify the sender
properly.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-12-16