diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/ctype_.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/libc/gen/ctype_.c b/lib/libc/gen/ctype_.c index c3fd0372ab8..de3b8fed69b 100644 --- a/lib/libc/gen/ctype_.c +++ b/lib/libc/gen/ctype_.c @@ -37,7 +37,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ctype_.c,v 1.3 1996/09/15 09:30:56 tholo Exp $"; +static char rcsid[] = "$OpenBSD: ctype_.c,v 1.4 2001/01/05 03:04:21 angelos Exp $"; #endif /* LIBC_SCCS and not lint */ #include <ctype.h> @@ -59,7 +59,32 @@ const char _C_ctype_[1 + 256] = { _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L, _L, _L, _L, _L, _L, _L, _L, _L, _L, _L, _L, _L, _L, _L, _L, _L, +/* + * define USE7BIT to force 7-bit ANSI behavior, otherwise the routine + * will determine printability based on the IS0 8859 8-bit standard + */ +#ifdef USE7BIT _L, _L, _L, _P, _P, _P, _P, _C +#else + _L, _L, _L, _P, _P, _P, _P, _C, + + _C, _C, _C, _C, _C, _C, _C, _C, /* 80 */ + _C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, /* 88 */ + _C, _C, _C, _C, _C, _C, _C, _C, /* 90 */ + _C, _C, _C, _C, _C, _C, _C, _C, /* 98 */ + _S|(char)_B, _P, _P, _P, _P, _P, _P, _P, /* A0 */ + _P, _P, _P, _P, _P, _P, _P, _P, /* A8 */ + _P, _P, _P, _P, _P, _P, _P, _P, /* B0 */ + _P, _P, _P, _P, _P, _P, _P, _P, /* B8 */ + _P, _P, _P, _P, _P, _P, _P, _P, /* C0 */ + _P, _P, _P, _P, _P, _P, _P, _P, /* C8 */ + _P, _P, _P, _P, _P, _P, _P, _P, /* D0 */ + _P, _P, _P, _P, _P, _P, _P, _P, /* D8 */ + _P, _P, _P, _P, _P, _P, _P, _P, /* E0 */ + _P, _P, _P, _P, _P, _P, _P, _P, /* E8 */ + _P, _P, _P, _P, _P, _P, _P, _P, /* F0 */ + _P, _P, _P, _P, _P, _P, _P, _C /* F8 */ +#endif /*USE7BIT*/ }; const char *_ctype_ = _C_ctype_; |