diff options
author | ache <ache@FreeBSD.org> | 1996-03-25 13:35:36 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-03-25 13:35:36 +0000 |
commit | 5719077b9bc1f88fe7168bb6f209aa816b980b9c (patch) | |
tree | 05c9b23d44daef392d38e48ded3f0c01255f44a8 /lib | |
parent | 53d0d5e30383bcc8b1c8dead2b0559217b078053 (diff) | |
download | FreeBSD-src-5719077b9bc1f88fe7168bb6f209aa816b980b9c.zip FreeBSD-src-5719077b9bc1f88fe7168bb6f209aa816b980b9c.tar.gz |
Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/locale/runetype.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/libc/locale/runetype.c b/lib/libc/locale/runetype.c index ba128c6..a9bba8e 100644 --- a/lib/libc/locale/runetype.c +++ b/lib/libc/locale/runetype.c @@ -45,18 +45,10 @@ ___runetype(c) int x; _RuneRange *rr = &_CurrentRuneLocale->runetype_ext; _RuneEntry *re = rr->ranges; -#endif - if (c == EOF) - return(0); - if (c < 0) { - if (c >= -128) /* signed char */ - return(_CurrentRuneLocale->runetype[(unsigned char)c]); - else - return(0); - } + if (c < 0 || c == EOF) + return(0L); -#ifdef XPG4 for (x = 0; x < rr->nranges; ++x, ++re) { if (c < re->min) return(0L); |