Deleted Added
full compact
_ctype.h (128523) _ctype.h (130961)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 25 unchanged lines hidden (view full) ---

34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * @(#)ctype.h 8.4 (Berkeley) 1/21/94
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 25 unchanged lines hidden (view full) ---

34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * @(#)ctype.h 8.4 (Berkeley) 1/21/94
42 * $FreeBSD: head/include/_ctype.h 128523 2004-04-21 13:25:55Z tjr $
42 * $FreeBSD: head/include/_ctype.h 130961 2004-06-23 07:01:44Z tjr $
43 */
44
45#ifndef _CTYPE_H_
46#define _CTYPE_H_
47
48#include <sys/cdefs.h>
49#include <sys/_types.h>
50

--- 134 unchanged lines hidden (view full) ---

185 (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
186
187#include <runetype.h>
188
189static __inline int
190__maskrune(__ct_rune_t _c, unsigned long _f)
191{
192 return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) :
43 */
44
45#ifndef _CTYPE_H_
46#define _CTYPE_H_
47
48#include <sys/cdefs.h>
49#include <sys/_types.h>
50

--- 134 unchanged lines hidden (view full) ---

185 (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
186
187#include <runetype.h>
188
189static __inline int
190__maskrune(__ct_rune_t _c, unsigned long _f)
191{
192 return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) :
193 _CurrentRuneLocale->runetype[_c]) & _f;
193 _CurrentRuneLocale->__runetype[_c]) & _f;
194}
195
196static __inline int
197__istype(__ct_rune_t _c, unsigned long _f)
198{
199 return (!!__maskrune(_c, _f));
200}
201
202static __inline int
203__isctype(__ct_rune_t _c, unsigned long _f)
204{
205 return (_c < 0 || _c >= _CACHED_RUNES) ? 0 :
194}
195
196static __inline int
197__istype(__ct_rune_t _c, unsigned long _f)
198{
199 return (!!__maskrune(_c, _f));
200}
201
202static __inline int
203__isctype(__ct_rune_t _c, unsigned long _f)
204{
205 return (_c < 0 || _c >= _CACHED_RUNES) ? 0 :
206 !!(_DefaultRuneLocale.runetype[_c] & _f);
206 !!(_DefaultRuneLocale.__runetype[_c] & _f);
207}
208
209static __inline __ct_rune_t
210__toupper(__ct_rune_t _c)
211{
212 return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) :
207}
208
209static __inline __ct_rune_t
210__toupper(__ct_rune_t _c)
211{
212 return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) :
213 _CurrentRuneLocale->mapupper[_c];
213 _CurrentRuneLocale->__mapupper[_c];
214}
215
216static __inline __ct_rune_t
217__tolower(__ct_rune_t _c)
218{
219 return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) :
214}
215
216static __inline __ct_rune_t
217__tolower(__ct_rune_t _c)
218{
219 return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) :
220 _CurrentRuneLocale->maplower[_c];
220 _CurrentRuneLocale->__maplower[_c];
221}
222
223#else /* not using inlines */
224
225__BEGIN_DECLS
226int __maskrune(__ct_rune_t, unsigned long);
227int __istype(__ct_rune_t, unsigned long);
228int __isctype(__ct_rune_t, unsigned long);
229__ct_rune_t __toupper(__ct_rune_t);
230__ct_rune_t __tolower(__ct_rune_t);
231__END_DECLS
232#endif /* using inlines */
233
234#endif /* !_CTYPE_H_ */
221}
222
223#else /* not using inlines */
224
225__BEGIN_DECLS
226int __maskrune(__ct_rune_t, unsigned long);
227int __istype(__ct_rune_t, unsigned long);
228int __isctype(__ct_rune_t, unsigned long);
229__ct_rune_t __toupper(__ct_rune_t);
230__ct_rune_t __tolower(__ct_rune_t);
231__END_DECLS
232#endif /* using inlines */
233
234#endif /* !_CTYPE_H_ */