Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ucbcad!ucbvax!cartan!wheatena!lippin From: lippin@wheatena (The Apathist) Newsgroups: comp.sys.mac Subject: Re: small LSC ControlMgr.h problem Message-ID: <1374@cartan.Berkeley.EDU> Date: Sun, 1-Nov-87 06:02:34 EST Article-I.D.: cartan.1374 Posted: Sun Nov 1 06:02:34 1987 Date-Received: Thu, 5-Nov-87 07:41:54 EST References: <1987Oct30.230309.12490@gpu.utcs.toronto.edu> Sender: nobody@cartan.Berkeley.EDU Reply-To: lippin@wheatena.UUCP (Tom Lippincott, ..ucbvax!bosco!lippin) Organization: UC Berkeley Math Department Lines: 18 Recently mms@gpu.utcs.UUCP (John J. Chew III) said: > >In the definition of the typedef ControlRecord, field contrlHilite >(among others) is of type char. If the control is to be inactive, >this field should be set to 255. Unfortunately, if contrlHilite is >subsequently compared to 255 or 0xff, the code generated sign-extends >contrlHilite but not 255 and therefore does not find them to be equal. > >I believe contrlHilite should be of type unsigned char and not char. That wouldn't hurt (I never cared for sign in chars anyway), but you should be comparing it to (char)255, as it is a char after all. --Tom Lippincott ..ucbvax!bosco!lippin "If there were more people like you, there'd be less people like you!" --Hawkeye Pierce, of Colonel Flagg, M*A*S*H