Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gen Remove sentence about casting to int (also from...



details:   https://anonhg.NetBSD.org/src/rev/367671a04ca5
branches:  trunk
changeset: 336324:367671a04ca5
user:      wiz <wiz%NetBSD.org@localhost>
date:      Wed Feb 25 16:23:40 2015 +0000

description:
Remove sentence about casting to int (also from example).
Bump date.

ok joerg@

diffstat:

 lib/libc/gen/ctype.3 |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r 7349f041fe6e -r 367671a04ca5 lib/libc/gen/ctype.3
--- a/lib/libc/gen/ctype.3      Wed Feb 25 15:50:16 2015 +0000
+++ b/lib/libc/gen/ctype.3      Wed Feb 25 16:23:40 2015 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: ctype.3,v 1.21 2010/05/06 11:46:11 jruoho Exp $
+.\"    $NetBSD: ctype.3,v 1.22 2015/02/25 16:23:40 wiz Exp $
 .\"
 .\" Copyright (c) 1991 Regents of the University of California.
 .\" All rights reserved.
@@ -30,7 +30,7 @@
 .\"
 .\"     @(#)ctype.3    6.5 (Berkeley) 4/19/91
 .\"
-.Dd May 6, 2010
+.Dd February 25, 2015
 .Dt CTYPE 3
 .Os
 .Sh NAME
@@ -80,7 +80,7 @@
 const char *s = "xyz";
 
 while (*s != '\e0') {
-    putchar(toupper((int)(unsigned char)*s));
+    putchar(toupper((unsigned char)*s));
     s++;
 }
 .Ed
@@ -137,9 +137,6 @@
 must first be cast to
 .Vt unsigned char ,
 to ensure that the values are within the correct range.
-The result should then be cast to
-.Vt int
-to avoid warnings from some compilers.
 Casting a negative-valued
 .Vt char
 or



Home | Main Index | Thread Index | Old Index