Ignore:
Timestamp:
Jan 19, 2006, 3:44:53 AM (20 years ago)
Author:
bird
Message:

Fixes #30: Fixed two locale bugs. First, setlocale called a locale
dependent function for getting ctype flags. Second, all the
is<>() macros / functions was busted for non-ascii chars (-1..-128).

Location:
branches/libc-0.6/src/emx/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/include/InnoTekLIBC/locale.h

    r2163 r2511  
    316316/** @} */
    317317
     318
     319
     320
     321
     322
     323
     324
     325
     326
     327
     328
     329
     330
     331
     332
     333
     334
     335
     336
     337
     338
     339
     340
     341
     342
     343
     344
     345
     346
     347
     348
     349
     350
     351
     352
     353
     354
     355
     356
     357
    318358__END_DECLS
    319359
  • branches/libc-0.6/src/emx/include/_ctype.h

    r2058 r2511  
    166166static __inline__ unsigned __ctype(__ct_rune_t __ch, unsigned __f)
    167167{
    168     return !(__ch & ~0xffU)
    169         ? __libc_GLocaleCtype.aufType[__ch] & __f
     168    return
     169        ? __libc_GLocaleCtype.aufType[__ch] & __f
    170170        : 0;
    171171}
     
    178178static __inline__ int __isctype(__ct_rune_t __ch, unsigned __f)
    179179{
    180     return !(__ch & ~0xffU)
    181         ? !!(__libc_GLocaleCtypeDefault.aufType[__ch] & __f)
     180    return
     181        ? !!(__libc_GLocaleCtypeDefault.aufType[__ch] & __f)
    182182        : 0;
    183183}
     
    185185static __inline__ __ct_rune_t __toupper(__ct_rune_t __ch)
    186186{
    187     return !(__ch & ~0xffU)
    188         ? __libc_GLocaleCtype.auchUpper[__ch]
     187    return
     188        ? __libc_GLocaleCtype.auchUpper[__ch]
    189189        : (__ch);
    190190}
     
    192192static __inline__ __ct_rune_t __tolower(__ct_rune_t __ch)
    193193{
    194     return !(__ch & ~0xffU)
    195         ? __libc_GLocaleCtype.auchLower[__ch]
     194    return
     195        ? __libc_GLocaleCtype.auchLower[__ch]
    196196        : __ch;
    197197}
Note: See TracChangeset for help on using the changeset viewer.