summaryrefslogtreecommitdiff
path: root/lib/libc/locale/toupper.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1996-03-25 13:43:24 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1996-03-25 13:43:24 +0000
commit7871e368657acf90a78288826f9735abb177ce7c (patch)
treea90e68317ec5f4183a35334355850ada3393d92e /lib/libc/locale/toupper.c
parentbf939705965a09fcb0e8c40de9b8d77a3f6cb19c (diff)
Notes
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 08be64b5edfc7..9e609774b81ab 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);