Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!think!snorkelwacker!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: isascii (was: Another pitfall. Signed chars and ctype.h) Message-ID: <16024@haddock.ima.isc.com> Date: 26 Feb 90 03:55:00 GMT References: <1990Feb12.043324.5259@sq.sq.com> <680020@hpmwjaa.HP.COM> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 24 In article <680020@hpmwjaa.HP.COM> jeffa@hpmwtd.HP.COM (Jeff Aguilera) writes: >[Ray Butterworth wrote:] >> [If isascii() were guaranteed for *all* characters,] >> Then the missing isascii() wouldn't even be needed. >> This was proposed to the Committee and rejected on the (incorrect) >> grounds that it [would make the macro unsafe]. > >Introduce the inline keyword, and then inline all the ctype functions. >Simple solution, superior in all respects. Unnecessary, since (as Ray noted) the unsafe-macro argument was *incorrect*: the macro version would still evaluate the argument exactly once. Insufficient, since (as I noted earlier) the real problem is with the collision between signed chars and EOF. This is a problem with the specification itself, regardless of whether or not it's implemented as a macro. >(Gawd, ANSI C is brain dead.) I suppose it is, but not because of anything you've said here. I blame it on heredity; pre-ANSI C was worse. Karl W. Z. Heuer (karl@ima.ima.isc.com or harvard!ima!karl), The Walking Lint