🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #25565

Problem with typdef of Bool

#25565
From: lmjm
Date: Sun, 10 May 1987 13:30
28 lines
1392 bytes
In serveral of the utility sources (and once in Xlib) there is a definition of Bool:-
typedef enum _bool {FALSE, TRUE} Bool

Later on there are various places where you get:-
	Bool somevar;

	if(!somevar)...

Yet as far as I can recall ! is not defined to work over elements
enum's  it was only allowed due to over generous implementation of
enum's in PCC.  I was using a version of the compiler written from
scratch and it rejected everyone of these.  Using the more old
fashioned

typedef int Bool;
#define FALSE 0
#define TRUE 1

works just as well and is not a questionable construct.

	Lee.
--
UKUUCP SUPPORT  Lee McLoughlin
	"What you once thought was only a nightmare is now a reality!"

Janet: lmjm@uk.ac.ic.doc, lmcl@uk.ac.ukc
DARPA: lmjm@doc.ic.ac.uk (or lmjm%uk.ac.ic.doc@cs.ucl.ac.uk)
Uucp:  lmjm@icdoc.UUCP, ukc!icdoc!lmjm
Technical Details
Message-ID: <8705101430.a026906@ivax.doc.ic.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!gatech!hao!ames!ucbcad!ucbvax!doc.ic.ac.UK!lmjm

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!gatech!hao!ames!ucbcad!ucbvax!doc.ic.ac.UK!lmjm
From: lmjm@doc.ic.ac.UK
Newsgroups: comp.windows.x
Subject: Problem with typdef of Bool
Message-ID: <8705101430.a026906@ivax.doc.ic.ac.uk>
Date: Sun, 10-May-87 09:30:50 EDT
Article-I.D.: ivax.8705101430.a026906
Posted: Sun May 10 09:30:50 1987
Date-Received: Wed, 13-May-87 01:09:43 EDT
Sender: usenet@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 28