Subject: Re: Type coersion long->int ?
To: None <current-users@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: current-users
Date: 02/03/2000 12:19:28
In message <200002031315.NAA22704@orchard.arlington.ma.us>, Bill Sommerfeld wri
tes:
>> 	makes sense.  so why the int argument, instead of char?  Does that make
>> a difference in speed?  historical reasons?

>getc/fgetc return an int, so that EOF is distinguishable from other
>values it may return..

Yes, but that's not why the is* functions take int.  They take int because
(hey, anyone remember this thread?) under the old K&R promotion rules, their
argument was effectively an int anyway.

Hmm.  Thinking about it more, I suppose the ability to distinguish EOF is
also probably useful enough to them that it's "the other reason", but it
may be an afterthought; I know that *old* toupper() implementations used to
not work on anything not in islower(), so some of the current range is a new
invention.

-s