svn commit: r196752 - head/lib/libc/stdtime
Joerg Sonnenberger
joerg at britannica.bec.de
Thu Sep 3 12:12:40 UTC 2009
On Thu, Sep 03, 2009 at 11:08:26AM +0200, Dag-Erling Smørgrav wrote:
> @@ -65,6 +65,15 @@
> .It "\&031\ EM \t032\ SUB \t033\ ESC \t034\ FS \t035\ GS"
> .It "\&036\ RS \t037\ US \t177\ DEL"
> .El
> +.Pp
> +.Em NOTE :
> +if the value passed to the
> +.Fn iscntrl
> +function is a
> +.Vt signed char ,
> +as is usually the case, it must be cast to an
> +.Vt unsigned char
> +to avoid sign-extension errors.
> .Sh RETURN VALUES
> The
> .Fn iscntrl
This is actually not good enough. ISO C doesn't specify whether plain
char is signed or unsigned.
Also, isascii is the only exception to this rule, so the change for that
is wrong.
Joerg
More information about the svn-src-all
mailing list