diff options
author | ache <ache@FreeBSD.org> | 1996-03-25 13:46:21 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-03-25 13:46:21 +0000 |
commit | 7b4c29b27b601664fe625981814b77ea4be637b8 (patch) | |
tree | 32751793472f7ee3e2be10721d7d41fdbdca14b1 /include/_ctype.h | |
parent | 5ae177135b1537604602319633c7e12b6af6a22a (diff) | |
download | FreeBSD-src-7b4c29b27b601664fe625981814b77ea4be637b8.zip FreeBSD-src-7b4c29b27b601664fe625981814b77ea4be637b8.tar.gz |
Slightly simplify inlined functions
Diffstat (limited to 'include/_ctype.h')
-rw-r--r-- | include/_ctype.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/_ctype.h b/include/_ctype.h index 963a4d4..e875705 100644 --- a/include/_ctype.h +++ b/include/_ctype.h @@ -141,8 +141,7 @@ __END_DECLS static __inline int __istype(_BSD_RUNE_T_ _c, unsigned long _f) { - return (_c < 0 || _c & _CRMASK) ? !!(___runetype(_c) & _f) : - (_c >= _CACHED_RUNES) ? 0 : + return (_c < 0 || _c >= _CACHED_RUNES) ? !!(___runetype(_c) & _f) : !!(_CurrentRuneLocale->runetype[_c] & _f); } @@ -156,16 +155,14 @@ __isctype(_BSD_RUNE_T_ _c, unsigned long _f) static __inline _BSD_RUNE_T_ __toupper(_BSD_RUNE_T_ _c) { - return (_c < 0 || _c & _CRMASK) ? ___toupper(_c) : - (_c >= _CACHED_RUNES) ? _c : + return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) : _CurrentRuneLocale->mapupper[_c]; } static __inline _BSD_RUNE_T_ __tolower(_BSD_RUNE_T_ _c) { - return (_c < 0 || _c & _CRMASK) ? ___tolower(_c) : - (_c >= _CACHED_RUNES) ? _c : + return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) : _CurrentRuneLocale->maplower[_c]; } |