ctype.h (15483) | ctype.h (29818) |
---|---|
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. --- 70 unchanged lines hidden (view full) --- 79int isxdigit __P((int)); 80int tolower __P((int)); 81int toupper __P((int)); 82 83#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) 84int isascii __P((int)); 85int isblank __P((int)); 86int toascii __P((int)); | 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. --- 70 unchanged lines hidden (view full) --- 79int isxdigit __P((int)); 80int tolower __P((int)); 81int toupper __P((int)); 82 83#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) 84int isascii __P((int)); 85int isblank __P((int)); 86int toascii __P((int)); |
87int digittoint __P((int)); |
|
87#endif 88__END_DECLS 89 90#define isalnum(c) __istype((c), (_A|_D)) 91#define isalpha(c) __istype((c), _A) 92#define iscntrl(c) __istype((c), _C) 93#define isdigit(c) __isctype((c), _D) /* ANSI -- locale independent */ 94#define isgraph(c) __istype((c), _G) --- 5 unchanged lines hidden (view full) --- 100#define isxdigit(c) __isctype((c), _X) /* ANSI -- locale independent */ 101#define tolower(c) __tolower(c) 102#define toupper(c) __toupper(c) 103 104#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) 105#define isascii(c) (((c) & ~0x7F) == 0) 106#define isblank(c) __istype((c), _B) 107#define toascii(c) ((c) & 0x7F) | 88#endif 89__END_DECLS 90 91#define isalnum(c) __istype((c), (_A|_D)) 92#define isalpha(c) __istype((c), _A) 93#define iscntrl(c) __istype((c), _C) 94#define isdigit(c) __isctype((c), _D) /* ANSI -- locale independent */ 95#define isgraph(c) __istype((c), _G) --- 5 unchanged lines hidden (view full) --- 101#define isxdigit(c) __isctype((c), _X) /* ANSI -- locale independent */ 102#define tolower(c) __tolower(c) 103#define toupper(c) __toupper(c) 104 105#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) 106#define isascii(c) (((c) & ~0x7F) == 0) 107#define isblank(c) __istype((c), _B) 108#define toascii(c) ((c) & 0x7F) |
109#define digittoint(c) (__maskrune((c), 0xFF)) |
|
108 109/* XXX the following macros are not backed up by functions. */ | 110 111/* XXX the following macros are not backed up by functions. */ |
110#define digittoint(c) __istype((c), 0xFF) | |
111#define ishexnumber(c) __istype((c), _X) 112#define isideogram(c) __istype((c), _I) 113#define isnumber(c) __istype((c), _D) 114#define isphonogram(c) __istype((c), _Q) 115#define isrune(c) __istype((c), 0xFFFFFF00L) 116#define isspecial(c) __istype((c), _T) 117#endif 118 --- 42 unchanged lines hidden (view full) --- 161 162static __inline _BSD_CT_RUNE_T_ 163__tolower(_BSD_CT_RUNE_T_ _c) 164{ 165 return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) : 166 _CurrentRuneLocale->maplower[_c]; 167} 168 | 112#define ishexnumber(c) __istype((c), _X) 113#define isideogram(c) __istype((c), _I) 114#define isnumber(c) __istype((c), _D) 115#define isphonogram(c) __istype((c), _Q) 116#define isrune(c) __istype((c), 0xFFFFFF00L) 117#define isspecial(c) __istype((c), _T) 118#endif 119 --- 42 unchanged lines hidden (view full) --- 162 163static __inline _BSD_CT_RUNE_T_ 164__tolower(_BSD_CT_RUNE_T_ _c) 165{ 166 return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) : 167 _CurrentRuneLocale->maplower[_c]; 168} 169 |
170static __inline int 171__maskrune(_BSD_RUNE_T_ c, unsigned long f) 172{ 173 return(((c & _CRMASK) 174 ? ___runetype(c) : _CurrentRuneLocale->runetype[c]) & f); 175} 176 |
|
169#else /* not using inlines */ 170 171__BEGIN_DECLS 172int __istype __P((_BSD_CT_RUNE_T_, unsigned long)); 173int __isctype __P((_BSD_CT_RUNE_T_, unsigned long)); | 177#else /* not using inlines */ 178 179__BEGIN_DECLS 180int __istype __P((_BSD_CT_RUNE_T_, unsigned long)); 181int __isctype __P((_BSD_CT_RUNE_T_, unsigned long)); |
182int __maskrune __P((_BSD_CT_RUNE_T_, unsigned long)); |
|
174_BSD_CT_RUNE_T_ __toupper __P((_BSD_CT_RUNE_T_)); 175_BSD_CT_RUNE_T_ __tolower __P((_BSD_CT_RUNE_T_)); 176__END_DECLS 177#endif /* using inlines */ 178 179#endif /* !_CTYPE_H_ */ | 183_BSD_CT_RUNE_T_ __toupper __P((_BSD_CT_RUNE_T_)); 184_BSD_CT_RUNE_T_ __tolower __P((_BSD_CT_RUNE_T_)); 185__END_DECLS 186#endif /* using inlines */ 187 188#endif /* !_CTYPE_H_ */ |