tech-userlevel archive

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

Re: Suggested change of ctype.h

On Mon, 15 Jun 2009 11:49:43 +0200
Alan Barrett <> wrote:

> Please could you suggest improvements to the man page.  For example, is
> the following text confusing or insufficient or in the wrong part of the
> man page?  (I suspect that text ilke this shuld be in the DESCRIPTION
> near the beginning of the man page, not in a CAVEATS section near the
> end.)
>      The argument to tolower() must be EOF or representable as an unsigned
>      char; otherwise, the behavior is undefined.  See the CAVEATS section of
>      ctype(3) for more details.

Yes, it would certainly be better to put this earlier in the man page.
You probably only look at the end of a man page, if something goes
seriously wrong, and compiler warnings are oftentimes just ignored.

Perhaps an explicit mention of the valid range of parameters, -1 (EOF)
and 0 to 255, would clarify things right away. Even the little word
'unsigned' before 'char' could be overlooked. I've seen so many sources
passing signed char, it seems that almost nobody is aware of the

I'll try to push corrections at least into MAME source, which was where
I stumbled over the warnings when I used NetBSD's gcc 4.1.3 to compile.
Funny enough the brand new wip/gcc44 doesn't complain anymore.


Home | Main Index | Thread Index | Old Index