Subversion Repositories planix.SVN

Rev

Rev 43 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 43 Rev 48
Line 34... Line 34...
34
 */
34
 */
35
 
35
 
36
#ifndef _WCHAR_H_
36
#ifndef _WCHAR_H_
37
#define _WCHAR_H_
37
#define _WCHAR_H_
38
 
38
 
-
 
39
#if defined (_POSIX_C_SOURCE) 
-
 
40
	#if  (_POSIX_C_SOURCE < 200112L)
-
 
41
		#error "This header file is not defined before POSIX IEEE Std 1003.1-2001"
-
 
42
	#endif
-
 
43
#else
-
 
44
	#if defined (_POSIX_SOURCE )
-
 
45
		#error "This header file is not defined before POSIX IEEE Std 1003.1-2001"
-
 
46
	#else
-
 
47
		#error "This header file is not defined in pure ANSI C89"
-
 
48
	#endif
-
 
49
#endif
-
 
50
 
-
 
51
/*
39
#include <sys/cdefs.h>
52
#include <sys/cdefs.h>
40
#include <sys/_null.h>
53
#include <sys/_null.h>
41
#include <sys/_types.h>
54
#include <sys/_types.h>
42
#include <machine/_limits.h>
55
#include <machine/_limits.h>
43
#include <_ctype.h>
56
#include <_ctype.h>
-
 
57
*/
44
 
58
 
45
#ifndef _MBSTATE_T_DECLARED
59
#ifndef _MBSTATE_T_DECLARED
46
typedef	__mbstate_t	mbstate_t;
60
typedef	long	mbstate_t;
47
#define	_MBSTATE_T_DECLARED
61
#define	_MBSTATE_T_DECLARED
48
#endif
62
#endif
49
 
63
 
-
 
64
/*
50
#ifndef _SIZE_T_DECLARED
65
#ifndef _SIZE_T_DECLARED
51
typedef	__size_t	size_t;
66
typedef	__size_t	size_t;
52
#define	_SIZE_T_DECLARED
67
#define	_SIZE_T_DECLARED
53
#endif
68
#endif
-
 
69
*/
-
 
70
 
54
 
71
 
-
 
72
/*
55
#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE
73
#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE
56
#ifndef _VA_LIST_DECLARED
74
#ifndef _VA_LIST_DECLARED
57
typedef	__va_list	va_list;
75
typedef	__va_list	va_list;
58
#define	_VA_LIST_DECLARED
76
#define	_VA_LIST_DECLARED
59
#endif
77
#endif
60
#endif
78
#endif
-
 
79
*/
61
 
80
 
-
 
81
/*
62
#ifndef	__cplusplus
82
#ifndef	__cplusplus
63
#ifndef _WCHAR_T_DECLARED
83
#ifndef _WCHAR_T_DECLARED
64
typedef	___wchar_t	wchar_t;
84
typedef	___wchar_t	wchar_t;
65
#define	_WCHAR_T_DECLARED
85
#define	_WCHAR_T_DECLARED
66
#endif
86
#endif
67
#endif
87
#endif
-
 
88
*/
68
 
89
 
-
 
90
/*
69
#ifndef _WINT_T_DECLARED
91
#ifndef _WINT_T_DECLARED
70
typedef	__wint_t	wint_t;
92
typedef	__wint_t	wint_t;
71
#define	_WINT_T_DECLARED
93
#define	_WINT_T_DECLARED
72
#endif
94
#endif
-
 
95
*/
73
 
96
 
74
#define	WCHAR_MIN	__WCHAR_MIN
97
#define	WCHAR_MIN	__WCHAR_MIN
75
#define	WCHAR_MAX	__WCHAR_MAX
98
#define	WCHAR_MAX	__WCHAR_MAX
76
 
99
 
77
#ifndef WEOF
100
#ifndef WEOF
78
#define	WEOF 	((wint_t)-1)
101
#define	WEOF 	((wint_t)-1)
79
#endif
102
#endif
80
 
103
 
81
#ifndef _STDFILE_DECLARED
-
 
82
#define _STDFILE_DECLARED
-
 
-
 
104
 
83
typedef struct __sFILE FILE;
105
typedef long wint_t;
-
 
106
 
84
#endif
107
 
85
struct tm;
108
struct tm;
86
 
109
 
87
__BEGIN_DECLS
-
 
88
wint_t	btowc(int);
110
wint_t	btowc(int);
89
wint_t	fgetwc(FILE *);
111
wint_t	fgetwc(FILE *);
90
wchar_t	*
112
wchar_t	*
91
	fgetws(wchar_t * __restrict, int, FILE * __restrict);
113
	fgetws(wchar_t * __restrict, int, FILE * __restrict);
92
wint_t	fputwc(wchar_t, FILE *);
114
wint_t	fputwc(wchar_t, FILE *);
Line 106... Line 128...
106
wint_t	putwchar(wchar_t);
128
wint_t	putwchar(wchar_t);
107
int	swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict,
129
int	swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict,
108
	    ...);
130
	    ...);
109
int	swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...);
131
int	swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...);
110
wint_t	ungetwc(wint_t, FILE *);
132
wint_t	ungetwc(wint_t, FILE *);
-
 
133
 
-
 
134
/*
111
int	vfwprintf(FILE * __restrict, const wchar_t * __restrict,
135
int	vfwprintf(FILE * __restrict, const wchar_t * __restrict,
112
	    __va_list);
136
	    __va_list);
113
int	vswprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict,
137
int	vswprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict,
114
	    __va_list);
138
	    __va_list);
115
int	vwprintf(const wchar_t * __restrict, __va_list);
139
int	vwprintf(const wchar_t * __restrict, __va_list);
-
 
140
*/
-
 
141
 
116
size_t	wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict);
142
size_t	wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict);
117
wchar_t	*wcscat(wchar_t * __restrict, const wchar_t * __restrict);
143
wchar_t	*wcscat(wchar_t * __restrict, const wchar_t * __restrict);
-
 
144
 
118
wchar_t	*wcschr(const wchar_t *, wchar_t) __pure;
145
wchar_t	*wcschr(const wchar_t *, wchar_t) ;
-
 
146
 
119
int	wcscmp(const wchar_t *, const wchar_t *) __pure;
147
int	wcscmp(const wchar_t *, const wchar_t *) ;
120
int	wcscoll(const wchar_t *, const wchar_t *);
148
int	wcscoll(const wchar_t *, const wchar_t *);
121
wchar_t	*wcscpy(wchar_t * __restrict, const wchar_t * __restrict);
149
wchar_t	*wcscpy(wchar_t * __restrict, const wchar_t * __restrict);
122
size_t	wcscspn(const wchar_t *, const wchar_t *) __pure;
150
size_t	wcscspn(const wchar_t *, const wchar_t *) ;
123
size_t	wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict,
151
size_t	wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict,
124
	    const struct tm * __restrict);
152
	    const struct tm * __restrict);
125
size_t	wcslen(const wchar_t *) __pure;
153
size_t	wcslen(const wchar_t *) ;
126
wchar_t	*wcsncat(wchar_t * __restrict, const wchar_t * __restrict,
154
wchar_t	*wcsncat(wchar_t * __restrict, const wchar_t * __restrict,
127
	    size_t);
155
	    size_t);
128
int	wcsncmp(const wchar_t *, const wchar_t *, size_t) __pure;
156
int	wcsncmp(const wchar_t *, const wchar_t *, size_t) ;
129
wchar_t	*wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t);
157
wchar_t	*wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t);
130
wchar_t	*wcspbrk(const wchar_t *, const wchar_t *) __pure;
158
wchar_t	*wcspbrk(const wchar_t *, const wchar_t *) ;
131
wchar_t	*wcsrchr(const wchar_t *, wchar_t) __pure;
159
wchar_t	*wcsrchr(const wchar_t *, wchar_t) ;
132
size_t	wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
160
size_t	wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
133
	    mbstate_t * __restrict);
161
	    mbstate_t * __restrict);
134
size_t	wcsspn(const wchar_t *, const wchar_t *) __pure;
162
size_t	wcsspn(const wchar_t *, const wchar_t *) ;
135
wchar_t	*wcsstr(const wchar_t * __restrict, const wchar_t * __restrict)
163
wchar_t	*wcsstr(const wchar_t * __restrict, const wchar_t * __restrict)
136
	    __pure;
164
	    ;
137
size_t	wcsxfrm(wchar_t * __restrict, const wchar_t * __restrict, size_t);
165
size_t	wcsxfrm(wchar_t * __restrict, const wchar_t * __restrict, size_t);
138
int	wctob(wint_t);
166
int	wctob(wint_t);
139
double	wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
167
double	wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
140
wchar_t	*wcstok(wchar_t * __restrict, const wchar_t * __restrict,
168
wchar_t	*wcstok(wchar_t * __restrict, const wchar_t * __restrict,
141
	    wchar_t ** __restrict);
169
	    wchar_t ** __restrict);
142
long	 wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int);
170
long	 wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int);
143
unsigned long
171
unsigned long
144
	 wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int);
172
	 wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int);
145
wchar_t	*wmemchr(const wchar_t *, wchar_t, size_t) __pure;
173
wchar_t	*wmemchr(const wchar_t *, wchar_t, size_t) ;
146
int	wmemcmp(const wchar_t *, const wchar_t *, size_t) __pure;
174
int	wmemcmp(const wchar_t *, const wchar_t *, size_t) ;
147
wchar_t	*wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
175
wchar_t	*wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
148
wchar_t	*wmemmove(wchar_t *, const wchar_t *, size_t);
176
wchar_t	*wmemmove(wchar_t *, const wchar_t *, size_t);
149
wchar_t	*wmemset(wchar_t *, wchar_t, size_t);
177
wchar_t	*wmemset(wchar_t *, wchar_t, size_t);
150
int	wprintf(const wchar_t * __restrict, ...);
178
int	wprintf(const wchar_t * __restrict, ...);
151
int	wscanf(const wchar_t * __restrict, ...);
179
int	wscanf(const wchar_t * __restrict, ...);
Line 194... Line 222...
194
wchar_t	*wcpcpy(wchar_t * __restrict, const wchar_t * __restrict);
222
wchar_t	*wcpcpy(wchar_t * __restrict, const wchar_t * __restrict);
195
wchar_t	*wcpncpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
223
wchar_t	*wcpncpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
196
wchar_t	*wcsdup(const wchar_t *) __malloc_like;
224
wchar_t	*wcsdup(const wchar_t *) __malloc_like;
197
int	wcscasecmp(const wchar_t *, const wchar_t *);
225
int	wcscasecmp(const wchar_t *, const wchar_t *);
198
int	wcsncasecmp(const wchar_t *, const wchar_t *, size_t n);
226
int	wcsncasecmp(const wchar_t *, const wchar_t *, size_t n);
199
size_t	wcsnlen(const wchar_t *, size_t) __pure;
227
size_t	wcsnlen(const wchar_t *, size_t) ;
200
size_t	wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
228
size_t	wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
201
	    size_t, mbstate_t * __restrict);
229
	    size_t, mbstate_t * __restrict);
202
#endif
230
#endif
203
 
231
 
204
#if __BSD_VISIBLE
232
#if __BSD_VISIBLE
Line 208... Line 236...
208
#endif
236
#endif
209
 
237
 
210
#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
238
#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
211
#include <xlocale/_wchar.h>
239
#include <xlocale/_wchar.h>
212
#endif
240
#endif
213
__END_DECLS
-
 
214
 
241
 
215
#endif /* !_WCHAR_H_ */
242
#endif /* !_WCHAR_H_ */