Changeset 994


Ignore:
Timestamp:
Jan 18, 2004, 6:23:12 AM (22 years ago)
Author:
bird
Message:

Added BLANK attribute.

Location:
trunk/src/emx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/ctype.h

    • Property cvs2svn:cvs-rev changed from 1.10 to 1.11
    r993 r994  
    1111#define _CTYPE_H
    1212
    13 #if defined (__cplusplus)
    14 extern "C" {
    15 #endif
     13#include <sys/cdefs.h>
     14#include <sys/locale.h>
    1615
    17 #include <sys/locale.h>
     16__BEGIN_DECLS
    1817
    1918static inline int isalnum (int _c)
     
    5655{ return __locale_ctype.locase [_c & 0xff]; }
    5756
    58 #if !defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE)
    5957
    60 #define isascii(c) (!((c) & 0x80))
    61 #define toascii(c) ((c) & 0x7f)
    62 
     58#if __XSI_VISIBLE
     59static inline int _toupper (int _c)
     60{ return __locale_ctype.upcase [_c & 0xff]; }
     61static inline int _tolower (int _c)
     62{ return __locale_ctype.locase [_c & 0xff]; }
     63static inline int isascii (int _c)
     64{ return !(_c & 0x80); }
     65static inline int toascii (int _c)
     66{ return (_c & 0x7f); }
    6367#endif
    6468
    65 #if defined (__cplusplus)
    66 }
     69#if __BSD_VISIBLE
     70/* @todo int    digittoint(int); */
     71static inline int isblank (int _c)
     72{ return __locale_ctype.cflags [_c & 0xff] & (__BLANK); }
     73/* @todo int    ishexnumber(int); */
     74/* @todo int    isideogram(int); */
     75/* @todo int    isnumber(int); */
     76/* @todo int    isphonogram(int); */
     77/* @todo int    isrune(int); */
     78/* @todo int    isspecial(int); */
    6779#endif
    6880
     81__END_DECLS
     82
    6983#endif /* not _CTYPE_H */
  • trunk/src/emx/include/sys/locale.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r993 r994  
    2222
    2323/* Bit masks for __locale_global.ctype */
    24 #define __UPPER  0x01
    25 #define __LOWER  0x02
    26 #define __DIGIT  0x04
    27 #define __XDIGIT 0x08
    28 #define __CNTRL  0x10
    29 #define __SPACE  0x20
    30 #define __PUNCT  0x40
    31 #define __PRINT  0x80
     24#define __UPPER  0x0001
     25#define __LOWER  0x0002
     26#define __DIGIT  0x0004
     27#define __XDIGIT 0x0008
     28#define __CNTRL  0x0010
     29#define __SPACE  0x0020
     30#define __PUNCT  0x0040
     31#define __PRINT  0x0080
     32#define __BLANK  0x0100
    3233
    3334#ifdef __INTERNAL_DEFS
     
    8889{
    8990  /* Bit flags for every character (for isXXX() function series) */
    90   unsigned char cflags [256];
     91  unsigned short cflags [256];
    9192  /* All uppercased characters */
    9293  unsigned char upcase [256];
  • trunk/src/emx/src/lib/locale/setlocale.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r993 r994  
    486486            if (UniQueryPrint (locale_obj, ucs))
    487487              ct |= __PRINT;
     488            if (UniQueryBlank (locale_obj, ucs))
     489              ct |= __BLANK;
    488490
    489491            uc = Transform (locale_obj, uconv_obj, UniTransUpper, ucs, i);
Note: See TracChangeset for help on using the changeset viewer.