Changeset 1009


Ignore:
Timestamp:
Jan 18, 2004, 11:34:15 PM (22 years ago)
Author:
bird
Message:

typo

File:
1 edited

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.11 to 1.12
    r1008 r1009  
    88*/
    99
    10 #ifndef _CTYPE_H
    11 #define _CTYPE_H
     10#ifndef _CTYPE_H_
     11#define _CTYPE_H_
    1212
    1313#include <sys/cdefs.h>
     
    1515
    1616__BEGIN_DECLS
    17 
    18 static inline int isalnum (int _c)
    19 { return __locale_ctype.cflags [_c & 0xff] & (__UPPER|__LOWER|__DIGIT); }
    20 
    21 static inline int isalpha (int _c)
    22 { return __locale_ctype.cflags [_c & 0xff] & (__UPPER|__LOWER); }
    23 
    24 static inline int iscntrl (int _c)
    25 { return __locale_ctype.cflags [_c & 0xff] & (__CNTRL); }
    26 
    27 static inline int isdigit (int _c)
    28 { return __locale_ctype.cflags [_c & 0xff] & (__DIGIT); }
    29 
    30 static inline int isgraph (int _c)
    31 { return __locale_ctype.cflags [_c & 0xff] & (__PUNCT|__UPPER|__LOWER|__DIGIT); }
    32 
    33 static inline int islower (int _c)
    34 { return __locale_ctype.cflags [_c & 0xff] & (__LOWER); }
    35 
    36 static inline int isprint (int _c)
    37 { return __locale_ctype.cflags [_c & 0xff] & (__PRINT); }
    38 
    39 static inline int ispunct (int _c)
    40 { return __locale_ctype.cflags [_c & 0xff] & (__PUNCT); }
    41 
    42 static inline int isspace (int _c)
    43 { return __locale_ctype.cflags [_c & 0xff] & (__SPACE); }
    44 
    45 static inline int isupper (int _c)
    46 { return __locale_ctype.cflags [_c & 0xff] & (__UPPER); }
    47 
    48 static inline int isxdigit (int _c)
    49 { return __locale_ctype.cflags [_c & 0xff] & (__XDIGIT); }
    50 
    51 static inline int toupper (int _c)
    52 { return __locale_ctype.upcase [_c & 0xff]; }
    53 
    54 static inline int tolower (int _c)
    55 { return __locale_ctype.locase [_c & 0xff]; }
    56 
     17int     isalnum(int);
     18int     isalpha(int);
     19int     iscntrl(int);
     20int     isdigit(int);
     21int     isgraph(int);
     22int     islower(int);
     23int     isprint(int);
     24int     ispunct(int);
     25int     isspace(int);
     26int     isupper(int);
     27int     isxdigit(int);
     28int     toupper(int);
     29int     tolower(int);
    5730
    5831#if __XSI_VISIBLE
    59 static inline int _toupper (int _c)
    60 { return __locale_ctype.upcase [_c & 0xff]; }
    61 static inline int _tolower (int _c)
    62 { return __locale_ctype.locase [_c & 0xff]; }
    63 static inline int isascii (int _c)
    64 { return !(_c & 0x80); }
    65 static inline int toascii (int _c)
    66 { return (_c & 0x7f); }
     32int     _toupper(int);
     33int     _tolower(int);
     34int     isascii(int);
     35int     toascii(int);
    6736#endif
    6837
    6938#if __BSD_VISIBLE
    7039/* @todo int    digittoint(int); */
    71 static inline int isblank (int _c)
    72 { return __locale_ctype.cflags [_c & 0xff] & (__BLANK); }
    73 /* @todo int    ishexnumber(int); */
     40int     isblank(int);
     41int     ishexnumber(int);
    7442/* @todo int    isideogram(int); */
    75 /* @todo int    isnumber(int); */
     43int     isnumber(int);
    7644/* @todo int    isphonogram(int); */
    7745/* @todo int    isrune(int); */
    7846/* @todo int    isspecial(int); */
    7947#endif
    80 
    8148__END_DECLS
    8249
    83 #endif /* not _CTYPE_H */
     50#define isalnum(c)  __istype((c), (__UPPER)|(__LOWER)|(__DIGIT))
     51#define isalpha(c)  __istype((c), (__UPPER)|(__LOWER))
     52#define iscntrl(c)  __istype((c), (__CNTRL))
     53#define isdigit(c)  __istype((c), (__DIGIT))
     54#define isgraph(c)  __istype((c), (__PUNCT)|(__UPPER)|(__LOWER)|(__DIGIT))
     55#define islower(c)  __istype((c), (__LOWER))
     56#define isprint(c)  __istype((c), (__PRINT))
     57#define ispunct(c)  __istype((c), (__PUNCT))
     58#define isspace(c)  __istype((c), (__SPACE))
     59#define isupper(c)  __istype((c), (__UPPER))
     60#define isxdigit(c) __istype((c), (__XDIGIT))
     61#define toupper(c)  __toupper(c)
     62#define tolower(c)  __tolower(c)
     63
     64#if __XSI_VISIBLE
     65#define _toupper(_c) __toupper(c)
     66#define _tolower(_c) __tolower(c)
     67#define isascii(c)   (((c) & ~0x7F) == 0)
     68#define toascii(c)   ((c) & 0x7F)
     69#endif
     70
     71#if __BSD_VISIBLE
     72#define isblank(c)      __istype((c), (__BLANK))
     73#define ishexnumber(c)  __istype((c), (__XDIGIT))
     74#define isnumber(c)     __istype((c), (__DIGIT))
     75#endif
     76
     77
     78#if !defined(_DONT_USE_CTYPE_INLINE_) && \
     79    (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
     80
     81__BEGIN_DECLS
     82static inline int __istype(int _c, unsigned _f)
     83{ return __locale_ctype.cflags [_c & 0xff] & (_f); }
     84static inline int __toupper(int _c)
     85{ return __locale_ctype.upcase [_c & 0xff]; }
     86static inline int __tolower(int _c)
     87{ return __locale_ctype.locase [_c & 0xff]; }
     88__END_DECLS
     89
     90#else
     91
     92__BEGIN_DECLS
     93int __istype(int, unsigned);
     94int __toupper(int);
     95int __tolower(int);
     96__END_DECLS
     97
     98#endif
     99
     100#endif
Note: See TracChangeset for help on using the changeset viewer.