Subversion Repositories Kolibri OS

Rev

Rev 6330 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6330 Rev 6536
Line 1... Line 1...
1
#ifndef _CTYPE_H_
1
#ifndef _CTYPE_H_
2
#define _CTYPE_H_
2
#define _CTYPE_H_
Line 3... Line 3...
3
 
3
 
-
 
4
#include "_ansi.h"
Line 4... Line 5...
4
#include "_ansi.h"
5
#include 
Line 5... Line 6...
5
 
6
 
6
_BEGIN_STD_C
7
_BEGIN_STD_C
Line 17... Line 18...
17
int _EXFUN(isupper, (int __c));
18
int _EXFUN(isupper, (int __c));
18
int _EXFUN(isxdigit,(int __c));
19
int _EXFUN(isxdigit,(int __c));
19
int _EXFUN(tolower, (int __c));
20
int _EXFUN(tolower, (int __c));
20
int _EXFUN(toupper, (int __c));
21
int _EXFUN(toupper, (int __c));
Line 21... Line 22...
21
 
22
 
22
#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L
23
#if __ISO_C_VISIBLE >= 1999
23
int _EXFUN(isblank, (int __c));
24
int _EXFUN(isblank, (int __c));
Line 24... Line 25...
24
#endif
25
#endif
25
 
26
 
26
#ifndef __STRICT_ANSI__
27
#if __MISC_VISIBLE || __XSI_VISIBLE
27
int _EXFUN(isascii, (int __c));
28
int _EXFUN(isascii, (int __c));
28
int _EXFUN(toascii, (int __c));
29
int _EXFUN(toascii, (int __c));
29
#define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a')
30
#define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a')
Line 38... Line 39...
38
#define _C	040
39
#define _C	040
39
#define _X	0100
40
#define _X	0100
40
#define	_B	0200
41
#define	_B	0200
Line 41... Line 42...
41
 
42
 
42
#ifndef _MB_CAPABLE
-
 
43
extern _CONST __IMPORT char   *__ctype_ptr__;
43
#ifndef _MB_CAPABLE
44
#else
-
 
45
extern __IMPORT char   *__ctype_ptr__;
44
_CONST
-
 
45
#endif
Line 46... Line 46...
46
#endif
46
extern __IMPORT char   *__ctype_ptr__;
47
 
47
 
48
#ifndef __cplusplus
48
#ifndef __cplusplus
49
/* These macros are intentionally written in a manner that will trigger
49
/* These macros are intentionally written in a manner that will trigger
Line 67... Line 67...
67
#define isalnum(__c)	(__ctype_lookup(__c)&(_U|_L|_N))
67
#define isalnum(__c)	(__ctype_lookup(__c)&(_U|_L|_N))
68
#define isprint(__c)	(__ctype_lookup(__c)&(_P|_U|_L|_N|_B))
68
#define isprint(__c)	(__ctype_lookup(__c)&(_P|_U|_L|_N|_B))
69
#define	isgraph(__c)	(__ctype_lookup(__c)&(_P|_U|_L|_N))
69
#define	isgraph(__c)	(__ctype_lookup(__c)&(_P|_U|_L|_N))
70
#define iscntrl(__c)	(__ctype_lookup(__c)&_C)
70
#define iscntrl(__c)	(__ctype_lookup(__c)&_C)
Line 71... Line -...
71
 
-
 
72
#if defined(__GNUC__) && \
71
 
73
    (!defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901L)
72
#if defined(__GNUC__) && __ISO_C_VISIBLE >= 1999
74
#define isblank(__c) \
73
#define isblank(__c) \
75
  __extension__ ({ __typeof__ (__c) __x = (__c);		\
74
  __extension__ ({ __typeof__ (__c) __x = (__c);		\
76
        (__ctype_lookup(__x)&_B) || (int) (__x) == '\t';})
75
        (__ctype_lookup(__x)&_B) || (int) (__x) == '\t';})
Line 97... Line 96...
97
#   define tolower(__c) \
96
#   define tolower(__c) \
98
  __extension__ ({ __typeof__ (__c) __x = (__c);	\
97
  __extension__ ({ __typeof__ (__c) __x = (__c);	\
99
      (void) __ctype_ptr__[__x]; (tolower) (__x);})
98
      (void) __ctype_ptr__[__x]; (tolower) (__x);})
100
#  endif /* _MB_EXTENDED_CHARSETS* */
99
#  endif /* _MB_EXTENDED_CHARSETS* */
101
# endif /* __GNUC__ */
100
# endif /* __GNUC__ */
102
#endif /* !__cplusplus */
-
 
Line 103... Line 101...
103
 
101
 
104
#ifndef __STRICT_ANSI__
102
#if __MISC_VISIBLE || __XSI_VISIBLE
105
#define isascii(__c)	((unsigned)(__c)<=0177)
103
#define isascii(__c)	((unsigned)(__c)<=0177)
106
#define toascii(__c)	((__c)&0177)
104
#define toascii(__c)	((__c)&0177)
Line -... Line 105...
-
 
105
#endif
-
 
106
 
107
#endif
107
#endif /* !__cplusplus */
108
 
108
 
Line 109... Line 109...
109
/* For C++ backward-compatibility only.  */
109
/* For C++ backward-compatibility only.  */