summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/toupper.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-03-25 13:43:24 +0000
committerache <ache@FreeBSD.org>1996-03-25 13:43:24 +0000
commit5ae177135b1537604602319633c7e12b6af6a22a (patch)
treea90e68317ec5f4183a35334355850ada3393d92e /lib/libc/locale/toupper.c
parent5719077b9bc1f88fe7168bb6f209aa816b980b9c (diff)
downloadFreeBSD-src-5ae177135b1537604602319633c7e12b6af6a22a.zip
FreeBSD-src-5ae177135b1537604602319633c7e12b6af6a22a.tar.gz
Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
Diffstat (limited to 'lib/libc/locale/toupper.c')
-rw-r--r--lib/libc/locale/toupper.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/libc/locale/toupper.c b/lib/libc/locale/toupper.c
index 08be64b..9e60977 100644
--- a/lib/libc/locale/toupper.c
+++ b/lib/libc/locale/toupper.c
@@ -45,17 +45,10 @@ ___toupper(c)
int x;
_RuneRange *rr = &_CurrentRuneLocale->mapupper_ext;
_RuneEntry *re = rr->ranges;
-#endif
- if (c == EOF)
- return(EOF);
- if (c < 0) {
- if (c >= -128) /* signed char */
- return(_CurrentRuneLocale->mapupper[(unsigned char)c]);
- else
- return(c);
- }
-#ifdef XPG4
+ if (c < 0 || c == EOF)
+ return(c);
+
for (x = 0; x < rr->nranges; ++x, ++re) {
if (c < re->min)
return(c);
OpenPOWER on IntegriCloud