diff options
author | des <des@FreeBSD.org> | 2009-09-03 10:06:37 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2009-09-03 10:06:37 +0000 |
commit | a0077e3c9571a6ad4aedab9d8c6ed99c81354cbd (patch) | |
tree | 5d96d2a6f7e3dcf8963d6be4aade623c0b0191a2 /lib/libc/locale/tolower.3 | |
parent | 8dfe0837b70aac483be1d7a7830fd76e22c9d4bb (diff) | |
download | FreeBSD-src-a0077e3c9571a6ad4aedab9d8c6ed99c81354cbd.zip FreeBSD-src-a0077e3c9571a6ad4aedab9d8c6ed99c81354cbd.tar.gz |
Document the need for a cast when passing a char to a ctype function.
MFC after: 2 weeks
Diffstat (limited to 'lib/libc/locale/tolower.3')
-rw-r--r-- | lib/libc/locale/tolower.3 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libc/locale/tolower.3 b/lib/libc/locale/tolower.3 index fce37fd..f70651a 100644 --- a/lib/libc/locale/tolower.3 +++ b/lib/libc/locale/tolower.3 @@ -32,7 +32,7 @@ .\" @(#)tolower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt TOLOWER 3 .Os .Sh NAME @@ -53,6 +53,15 @@ The argument must be representable as an .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn tolower +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 If the argument is an upper-case letter, the .Fn tolower |