Changeset 2058 for trunk/src/emx/include
- Timestamp:
- Jun 23, 2005, 7:58:05 AM (20 years ago)
- Location:
- trunk/src/emx/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/InnoTekLIBC/locale.h
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r2057 r2058 90 90 /** MBCS prefixes. Two bits per character. */ 91 91 unsigned char au2MBCSPrefixs[256/4]; 92 /** Unicode translation. (0xffff means no ttranslation.) */92 /** Unicode translation. (0xffff means no translation.) */ 93 93 unsigned short aucUnicode[256]; 94 94 /** Unicode -> SBCS conversion: 0..128. */ … … 136 136 /** Bit flags for every character (for iswXXX() function series). */ 137 137 unsigned aufType[256]; 138 /** Mask used to check if an index is within the above arrays. 139 * This is required because 'C' doesn't do more than 0-127. So, 140 * the mask is either ~0xff or ~0x7f. */ 141 unsigned uMask; 138 142 } __LIBC_LOCALEWCTYPE; 139 143 /** Pointer to the Ctype unicode struct. */ … … 217 221 extern const __LIBC_LOCALECTYPE __libc_GLocaleCtypeDefault; 218 222 /** Cached Unicode (__wchar_t) case conversion tables and flags. */ 219 extern const__LIBC_LOCALEWCTYPE __libc_GLocaleWCtype;223 extern __LIBC_LOCALEWCTYPE __libc_GLocaleWCtype; 220 224 /** Locale information structure. */ 221 225 extern __LIBC_LOCALELCONV __libc_gLocaleLconv; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/_ctype.h
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r2057 r2058 71 71 /** Bit flags for every character (for iswXXX() function series). */ 72 72 unsigned aufType[256]; 73 /** Mask used to check if an index is within the above arrays. 74 * This is required because 'C' doesn't do more than 0-127. So, 75 * the mask is either ~0xff or ~0x7f. */ 76 unsigned uMask; 73 77 } __libc_GLocaleWCtype; 74 78 __END_DECLS … … 160 164 */ 161 165 __BEGIN_DECLS 162 static inlineunsigned __ctype(__ct_rune_t __ch, unsigned __f)163 { 164 return !( (__ch)& ~0xffU)165 ? __libc_GLocaleCtype.aufType[ (__ch)/* & 0xff*/] & (__f)166 static __inline__ unsigned __ctype(__ct_rune_t __ch, unsigned __f) 167 { 168 return !(__ch & ~0xffU) 169 ? __libc_GLocaleCtype.aufType[__ch] & __f 166 170 : 0; 167 171 } 168 172 169 static inlineint __istype(__ct_rune_t __ch, unsigned __f)170 { 171 return !!__ctype( (__ch), (__f));172 } 173 174 static inlineint __isctype(__ct_rune_t __ch, unsigned __f)175 { 176 return !( (__ch)& ~0xffU)177 ? !!(__libc_GLocaleCtypeDefault.aufType[ (__ch)/* & 0xff*/] & (__f))173 static __inline__ int __istype(__ct_rune_t __ch, unsigned __f) 174 { 175 return !!__ctype(__ch, __f); 176 } 177 178 static __inline__ int __isctype(__ct_rune_t __ch, unsigned __f) 179 { 180 return !(__ch & ~0xffU) 181 ? !!(__libc_GLocaleCtypeDefault.aufType[__ch] & __f) 178 182 : 0; 179 183 } 180 184 181 static inline__ct_rune_t __toupper(__ct_rune_t __ch)182 { 183 return !( (__ch)& ~0xffU)184 ? __libc_GLocaleCtype.auchUpper[ (__ch)/* & 0xff*/]185 static __inline__ __ct_rune_t __toupper(__ct_rune_t __ch) 186 { 187 return !(__ch & ~0xffU) 188 ? __libc_GLocaleCtype.auchUpper[__ch] 185 189 : (__ch); 186 190 } 187 191 188 static inline__ct_rune_t __tolower(__ct_rune_t __ch)189 { 190 return !( (__ch)& ~0xffU)191 ? __libc_GLocaleCtype.auchLower[ (__ch)/* & 0xff*/]192 : (__ch);193 } 194 195 196 static inlineunsigned __wctype(__wint_t __wc, unsigned __f)197 { 198 return !( (__wc) & ~0xffU)199 ? __libc_GLocaleWCtype.aufType[ (__wc)] & (__f)200 : ___wctype(__wc) & (__f);201 } 202 203 static inlineint __iswtype(__wint_t __wc, unsigned __f)204 { 205 return !!__wctype( (__wc), (__f));206 } 207 208 static inline__wint_t __towupper(__wint_t __wc)209 { 210 return !( (__wc) & ~0xffU)211 ? __libc_GLocaleWCtype.awcUpper[ (__wc)]192 static __inline__ __ct_rune_t __tolower(__ct_rune_t __ch) 193 { 194 return !(__ch & ~0xffU) 195 ? __libc_GLocaleCtype.auchLower[__ch] 196 : __ch; 197 } 198 199 200 static __inline__ unsigned __wctype(__wint_t __wc, unsigned __f) 201 { 202 return !(__wc & __libc_GLocaleWCtype.uMask) 203 ? __libc_GLocaleWCtype.aufType[__wc] & __f 204 : ___wctype(__wc) & __f; 205 } 206 207 static __inline__ int __iswtype(__wint_t __wc, unsigned __f) 208 { 209 return !!__wctype(__wc, __f); 210 } 211 212 static __inline__ __wint_t __towupper(__wint_t __wc) 213 { 214 return !(__wc & __libc_GLocaleWCtype.uMask) 215 ? __libc_GLocaleWCtype.awcUpper[__wc] 212 216 : ___towupper(__wc); 213 217 } 214 218 215 static inline__wint_t __towlower(__wint_t __wc)216 { 217 return !( (__wc) & ~0xffU)218 ? __libc_GLocaleWCtype.awcLower[ (__wc)]219 static __inline__ __wint_t __towlower(__wint_t __wc) 220 { 221 return !(__wc & __libc_GLocaleWCtype.uMask) 222 ? __libc_GLocaleWCtype.awcLower[__wc] 219 223 : ___towlower(__wc); 220 224 } 221 225 222 223 static inline int __wcwidth(__wint_t __wc) 224 { 225 if ((__wc) != 0) 226 static __inline__ int __wcwidth(__wint_t __wc) 227 { 228 if (__wc != 0) 226 229 { 227 unsigned __f = __wctype( (__wc), __CT_SCRW_MASK | __CT_PRINT);228 return ( (__f)& __CT_SCRW_MASK)229 ? ( (__f)& __CT_SCRW_MASK) >> __CT_SCRW_SHIFT230 : ( (__f)& __CT_PRINT) ? 1 : -1;230 unsigned __f = __wctype(__wc, __CT_SCRW_MASK | __CT_PRINT); 231 return (__f & __CT_SCRW_MASK) 232 ? (__f & __CT_SCRW_MASK) >> __CT_SCRW_SHIFT 233 : (__f & __CT_PRINT) ? 1 : -1; 231 234 } 232 235 else … … 250 253 unsigned __wctype(__wint_t, unsigned); 251 254 int __iswtype(__wint_t, unsigned); 252 __wint_t 253 __wint_t 255 __wint_t __towupper(__wint_t); 256 __wint_t __towlower(__wint_t); 254 257 int __wcwidth(__wint_t); 255 258 __END_DECLS -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/math.h
-
Property cvs2svn:cvs-rev
changed from
1.7
to1.8
r2057 r2058 97 97 : (sizeof (x) == sizeof (double)) ? __isfinite(x) \ 98 98 : __isfinitel(x)) 99 #ifdef IN_INNOTEK_LIBC 100 #undef isinf 101 #define isinf(x) \ 102 ((sizeof (x) == sizeof (float)) ? __isinff(x) \ 103 : (sizeof (x) == sizeof (double)) ? _STD(isinf)(x) \ 104 : __isinfl(x)) 105 #undef isnan 106 #define isnan(x) \ 107 ((sizeof (x) == sizeof (float)) ? isnanf(x) \ 108 : (sizeof (x) == sizeof (double)) ? _STD(isnan)(x) \ 109 : __isnanl(x)) 110 #else 99 111 #define isinf(x) \ 100 112 ((sizeof (x) == sizeof (float)) ? __isinff(x) \ … … 105 117 : (sizeof (x) == sizeof (double)) ? isnan(x) \ 106 118 : __isnanl(x)) 119 #endif 107 120 #define isnormal(x) \ 108 121 ((sizeof (x) == sizeof (float)) ? __isnormalf(x) \ … … 234 247 double hypot(double, double); 235 248 int ilogb(double) __pure2; 249 #ifdef IN_INNOTEK_LIBC 250 int _STD(isinf)(double) __pure2; 251 int _STD(isnan)(double) __pure2; 252 #else 236 253 int (isinf)(double) __pure2; 237 254 int (isnan)(double) __pure2; 255 #endif 238 256 double lgamma(double); 239 257 long long llrint(double); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.