[comp.windows.x] Boolean Type for X Toolkit

tnt@ADEA-ATT.ARPA (Tom Teng) (03/26/88)

In the X Toolkit "Intrinsic.h" header file, the following types and constants
are defined:


	#define FALSE 0
	#define TRUE 1
	
	typedef char Boolean;
	
Suppose someone defined a Boolean function as:
	
	Boolean resourceClass(className)
	String className;
	{
		if (uppercase(*className))
			return(FALSE);
		else
			return(TRUE):
	}
	
and used it in the following conditional:
 	if (resourceClass("confirmer") == TRUE)
 	  ....
because resourceClass is a boolean (i.e. char type), the above conditional
will never be true (comparing some control character to 1).  Shouldn't Booleanbe typedef as an int type.
(Am I being really stupid or what???)

also, when I am using dbx, why is String defined as caddr_t?

tnt