From owner-svn-src-all@FreeBSD.ORG Tue Mar 13 14:14:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C17B51065720; Tue, 13 Mar 2012 14:14:13 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFF538FC15; Tue, 13 Mar 2012 14:14:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DEEDR8048513; Tue, 13 Mar 2012 14:14:13 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DEEDBR048510; Tue, 13 Mar 2012 14:14:13 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203131414.q2DEEDBR048510@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 14:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232926 - in head: include/xlocale lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 14:14:14 -0000 Author: theraven Date: Tue Mar 13 14:14:13 2012 New Revision: 232926 URL: http://svn.freebsd.org/changeset/base/232926 Log: More xlocale cleanups. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h head/lib/libc/locale/Symbol.map Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Tue Mar 13 14:10:33 2012 (r232925) +++ head/include/xlocale/_ctype.h Tue Mar 13 14:14:13 2012 (r232926) @@ -68,19 +68,19 @@ _RuneLocale *__runes_for_locale(locale_t #endif /* _XLOCALE_INLINE */ #ifdef _XLOCALE_WCTYPES -static __inline int -__maskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); - return (_c < 0 || _c >= _CACHED_RUNES) ? ___runetype_l(_c, locale) : - runes->__runetype[_c] & _f; + int __limit; + _RuneLocale *runes = __runes_for_locale(__loc, &__limit); + return (__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : + runes->__runetype[__c] & __f; } -static __inline int -__istype_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE __inline int +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - return (!!__maskrune_l(_c, _f, locale)); + return (!!__maskrune_l(__c, __f, __loc)); } #define XLOCALE_ISCTYPE(fname, cat) \ @@ -88,25 +88,25 @@ __istype_l(__ct_rune_t _c, unsigned long _XLOCALE_INLINE int isw##fname##_l(int __c, locale_t __l)\ { return __istype_l(__c, cat, __l); } #else -static __inline int -__sbmaskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); - return (_c < 0 || _c >= mb_sb_limit) ? 0 : - runes->__runetype[_c] & _f; + int __limit; + _RuneLocale *runes = __runes_for_locale(__loc, &__limit); + return (__c < 0 || __c >= __limit) ? 0 : + runes->__runetype[__c] & __f; } -static __inline int -__sbistype_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - return (!!__sbmaskrune_l(_c, _f, locale)); + return (!!__sbmaskrune_l(__c, __f, __loc)); } -#define XLOCALE_ISCTYPE(fname, cat) \ - _XLOCALE_INLINE int is##fname##_l(int c, locale_t l); \ - _XLOCALE_INLINE int is##fname##_l(int c, locale_t l)\ - { return __sbistype_l(c, cat, l); } +#define XLOCALE_ISCTYPE(__fname, __cat) \ + _XLOCALE_INLINE int is##__fname##_l(int, locale_t); \ + _XLOCALE_INLINE int is##__fname##_l(int __c, locale_t __l)\ + { return __sbistype_l(__c, __cat, __l); } #endif XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D) @@ -136,15 +136,15 @@ _XLOCALE_INLINE int towupper_l(int, loca _XLOCALE_INLINE int towlower_l(int __c, locale_t __l) { - int mb_sb_limit; - _RuneLocale *__runes = __runes_for_locale(__l, &mb_sb_limit); + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); return (__c < 0 || __c >= _CACHED_RUNES) ? ___tolower_l(__c, __l) : __runes->__maplower[__c]; } _XLOCALE_INLINE int towupper_l(int __c, locale_t __l) { - int mb_sb_limit; - _RuneLocale *__runes = __runes_for_locale(__l, &mb_sb_limit); + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); return (__c < 0 || __c >= _CACHED_RUNES) ? ___toupper_l(__c, __l) : __runes->__mapupper[__c]; } Modified: head/lib/libc/locale/Symbol.map ============================================================================== --- head/lib/libc/locale/Symbol.map Tue Mar 13 14:10:33 2012 (r232925) +++ head/lib/libc/locale/Symbol.map Tue Mar 13 14:14:13 2012 (r232926) @@ -60,9 +60,13 @@ FBSD_1.0 { nextwctype; nl_langinfo; __maskrune; + __maskrune_l; __sbmaskrune; + __sbmaskrune_l; __istype; + __istype_l; __sbistype; + __sbistype_l; __isctype; __toupper; __sbtoupper;