lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Relatively mild dev13 build problems


From: Klaus Weide
Subject: Re: lynx-dev Relatively mild dev13 build problems
Date: Sat, 30 Oct 1999 16:34:42 -0500 (CDT)

On Sat, 30 Oct 1999, T.E.Dickey wrote:

> > For this, and lots of similar warnings below: 
> > There's a bunch of isdigit() atc. and tolower() that should have 
> > their argument cast to (unsigned char)... (or use one of the lynx 
> > macros instead, like TOLOWER). 
> 
> unsigned char -- or int?  (I thought the latter was needed to appease the
> compiler).  

To unsigned char if you know it is a char value (not already an int
that might be EOF) - think of it as getting rid of the minus sign, for
implementations where char is signed.  Casting to int directly
wouldn't do that (it does nothing).  It's for implementations where
isdigit(c) just expands to a simple-minded table lookup some_table[c].

If any compiler is not happy with isdigit((unsigned char)c) it should
be ignored.

> It's a nuisance (I'd rather not cast the parameter to isdigit
> if it's a char).

Well I don't know whether it's an actual problem anywhere.  It might
be for '\377' vs. EOF.  I don't know whether it's standard for these
macros to handle EOF specially - my man page says "must have the value
of an unsigned char or EOF".

   Klaus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]