diff options
author | bde <bde@FreeBSD.org> | 1995-04-07 11:52:17 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-04-07 11:52:17 +0000 |
commit | 76e6f5422f092b70e192619fa53058412c766b13 (patch) | |
tree | 4c261639777ed1b89c5712618d7216c38caa9529 /lib/libc/locale/isctype.c | |
parent | d60c039cdc1a7c5a23d38be0c4062ee46545edba (diff) | |
download | FreeBSD-src-76e6f5422f092b70e192619fa53058412c766b13.zip FreeBSD-src-76e6f5422f092b70e192619fa53058412c766b13.tar.gz |
Reviewed by: ache and wollman (long ago)
isctype.c:
o The tolower() and toupper() functions duplicated too much code
and were out of date (surprise). This didn't matter because
it was difficult to call them.
o Change formatting to be more like that in <ctype.h> (with
extra parentheses as in the macros). Perhaps this file should
be machine generated or everything should be handled like
__tolower() so that no code is repeated.
nomacros.c:
o Instead of looking at _USE_CTYPE_INLINE_ to see what <ctype.h>
has done, set _EXTERNALIZE_CTYPE_INLINES_ to tell <ctype.h>
what to do, so that we don't have anything left to do. Note
that code is now generated even if inlines are used by default.
This allows users to switch to non-inline versions.
Diffstat (limited to 'lib/libc/locale/isctype.c')
-rw-r--r-- | lib/libc/locale/isctype.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/libc/locale/isctype.c b/lib/libc/locale/isctype.c index 6610e0e..55cfdf0 100644 --- a/lib/libc/locale/isctype.c +++ b/lib/libc/locale/isctype.c @@ -43,7 +43,6 @@ static char sccsid[] = "@(#)isctype.c 8.3 (Berkeley) 2/24/94"; #endif /* LIBC_SCCS and not lint */ -#define _ANSI_LIBRARY #include <ctype.h> #undef isalnum @@ -51,7 +50,7 @@ int isalnum(c) int c; { - return(__istype((c), (_A|_D))); + return (__istype((c), (_A|_D))); } #undef isalpha @@ -67,7 +66,7 @@ int isascii(c) int c; { - return((c & ~0x7F) == 0); + return (((c) & ~0x7F) == 0); } #undef isblank @@ -155,7 +154,7 @@ int toascii(c) int c; { - return (c & 0177); + return ((c) & 0x7F); } #undef tolower @@ -163,7 +162,7 @@ int tolower(c) int c; { - return((c & _CRMASK) ? ___tolower(c) : _CurrentRuneLocale->maplower[c]); + return (__tolower(c)); } #undef toupper @@ -171,5 +170,5 @@ int toupper(c) int c; { - return((c & _CRMASK) ? ___toupper(c) : _CurrentRuneLocale->mapupper[c]); + return (__toupper(c)); } |