diff options
Diffstat (limited to 'lib/libc/gen/toupper_.c')
-rw-r--r-- | lib/libc/gen/toupper_.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/gen/toupper_.c b/lib/libc/gen/toupper_.c index 4fbfb81b654..b4630483cd0 100644 --- a/lib/libc/gen/toupper_.c +++ b/lib/libc/gen/toupper_.c @@ -4,16 +4,12 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: toupper_.c,v 1.2 1996/08/19 08:26:56 tholo Exp $"; +static char rcsid[] = "$OpenBSD: toupper_.c,v 1.3 2001/06/27 07:17:09 pjanzen Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> #include <ctype.h> -#if EOF != -1 -#error "EOF != -1" -#endif - const short _C_toupper_[1 + 256] = { EOF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, @@ -57,5 +53,7 @@ int toupper(c) int c; { + if (c != (unsigned char) c) + return(c); return((_toupper_tab_ + 1)[c]); } |