Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Another pitfall.  Signed chars and ctype.h.
Message-ID: <1990Feb10.231624.27231@utzoo.uucp>
Organization: U of Toronto Zoology
References: <Chsv$q2@cs.psu.edu> <11957@frog.UUCP>
Date: Sat, 10 Feb 90 23:16:24 GMT

In article <11957@frog.UUCP> john@frog.UUCP (John Woods) writes:
>You have to say
>
>	isascii(*s) && isdigit(*s)
>
>isdigit() and friends are all only defined on those values for which
>isascii() is true...

This is the K&R1 situation.  Unfortunately, the ANSI C situation is as
Felix represented it:  isdigit() is required to work on all unsigned chars
plus EOF.  Trying to build code that will work in both of these environments
is a real headache.
-- 
SVR4:  every feature you ever |     Henry Spencer at U of Toronto Zoology
wanted, and plenty you didn't.| uunet!attcan!utzoo!henry henry@zoo.toronto.edu
