File: wchar.h.0p

package info (click to toggle)
manpages-posix 1.67-3
  • links: PTS
  • area: non-free
  • in suites: sarge
  • size: 9,564 kB
  • ctags: 6
  • sloc: makefile: 69; sh: 37
file content (242 lines) | stat: -rw-r--r-- 10,242 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "<wchar.h>" P 2003 POSIX
.\" <wchar.h> 
.SH NAME
wchar.h \- wide-character handling
.SH SYNOPSIS
.LP
\fB#include <wchar.h>\fP
.SH DESCRIPTION
.LP
Some of the functionality described on this reference page extends
the ISO\ C standard. Applications shall define
the appropriate feature test macro (see the System Interfaces volume
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
to enable the visibility of these symbols in this
header. 
.LP
The \fI<wchar.h>\fP header shall define the following types:
.TP 7
\fBwchar_t\fP
As described in \fI<stddef.h>\fP .
.TP 7
\fBwint_t\fP
An integer type capable of storing any valid value of \fBwchar_t\fP
or WEOF.
.TP 7
\fBwctype_t\fP
A scalar type of a data object that can hold values which represent
locale-specific character classification. 
.TP 7
\fBmbstate_t\fP
An object type other than an array type that can hold the conversion
state information necessary to convert between sequences
of (possibly multi-byte) characters and wide characters.   \ If a
codeset is being used such that an \fBmbstate_t\fP needs to
preserve more than 2 levels of reserved state, the results are unspecified.
.TP 7
\fBFILE\fP
As described in \fI<stdio.h>\fP . 
.TP 7
\fBsize_t\fP
As described in \fI<stddef.h>\fP .
.TP 7
\fBva_list\fP
As described in \fI<stdarg.h>\fP . 
.sp
.LP
The implementation shall support one or more programming environments
in which the width of \fBwint_t\fP is no greater than the
width of type \fBlong\fP. The names of these programming environments
can be obtained using the \fIconfstr\fP() function or the \fIgetconf\fP
utility.
.LP
The following shall be declared as functions and may also be defined
as macros. Function prototypes shall be provided.
.sp
.RS
.nf

\fBwint_t        btowc(int);
wint_t        fgetwc(FILE *);
wchar_t      *fgetws(wchar_t *restrict, int, FILE *restrict);
wint_t        fputwc(wchar_t, FILE *);
int           fputws(const wchar_t *restrict, FILE *restrict);
int           fwide(FILE *, int);
int           fwprintf(FILE *restrict, const wchar_t *restrict, ...);
int           fwscanf(FILE *restrict, const wchar_t *restrict, ...);
wint_t        getwc(FILE *);
wint_t        getwchar(void);

int           iswalnum(wint_t);
int           iswalpha(wint_t);
int           iswcntrl(wint_t);
int           iswctype(wint_t, wctype_t);
int           iswdigit(wint_t);
int           iswgraph(wint_t);
int           iswlower(wint_t);
int           iswprint(wint_t);
int           iswpunct(wint_t);
int           iswspace(wint_t);
int           iswupper(wint_t);
int           iswxdigit(wint_t);

size_t        mbrlen(const char *restrict, size_t, mbstate_t *restrict);
size_t        mbrtowc(wchar_t *restrict, const char *restrict, size_t,
                  mbstate_t *restrict);
int           mbsinit(const mbstate_t *);
size_t        mbsrtowcs(wchar_t *restrict, const char **restrict, size_t,
                  mbstate_t *restrict);
wint_t        putwc(wchar_t, FILE *);
wint_t        putwchar(wchar_t);
int           swprintf(wchar_t *restrict, size_t,
                  const wchar_t *restrict, ...);
int           swscanf(const wchar_t *restrict,
                  const wchar_t *restrict, ...);

wint_t        towlower(wint_t);
wint_t        towupper(wint_t);

wint_t        ungetwc(wint_t, FILE *);
int           vfwprintf(FILE *restrict, const wchar_t *restrict, va_list);
int           vfwscanf(FILE *restrict, const wchar_t *restrict, va_list);
int           vwprintf(const wchar_t *restrict, va_list);
int           vswprintf(wchar_t *restrict, size_t,
                  const wchar_t *restrict, va_list);
int           vswscanf(const wchar_t *restrict, const wchar_t *restrict,
                  va_list);
int           vwscanf(const wchar_t *restrict, va_list);
size_t        wcrtomb(char *restrict, wchar_t, mbstate_t *restrict);
wchar_t      *wcscat(wchar_t *restrict, const wchar_t *restrict);
wchar_t      *wcschr(const wchar_t *, wchar_t);
int           wcscmp(const wchar_t *, const wchar_t *);
int           wcscoll(const wchar_t *, const wchar_t *);
wchar_t      *wcscpy(wchar_t *restrict, const wchar_t *restrict);
size_t        wcscspn(const wchar_t *, const wchar_t *);
size_t        wcsftime(wchar_t *restrict, size_t,
                  const wchar_t *restrict, const struct tm *restrict);
size_t        wcslen(const wchar_t *);
wchar_t      *wcsncat(wchar_t *restrict, const wchar_t *restrict, size_t);
int           wcsncmp(const wchar_t *, const wchar_t *, size_t);
wchar_t      *wcsncpy(wchar_t *restrict, const wchar_t *restrict, size_t);
wchar_t      *wcspbrk(const wchar_t *, const wchar_t *);
wchar_t      *wcsrchr(const wchar_t *, wchar_t);
size_t        wcsrtombs(char *restrict, const wchar_t **restrict,
                  size_t, mbstate_t *restrict);
size_t        wcsspn(const wchar_t *, const wchar_t *);
wchar_t      *wcsstr(const wchar_t *restrict, const wchar_t *restrict);
double        wcstod(const wchar_t *restrict, wchar_t **restrict);
float         wcstof(const wchar_t *restrict, wchar_t **restrict);
wchar_t      *wcstok(wchar_t *restrict, const wchar_t *restrict,
                  wchar_t **restrict);
long          wcstol(const wchar_t *restrict, wchar_t **restrict, int);
long double   wcstold(const wchar_t *restrict, wchar_t **restrict);
long long     wcstoll(const wchar_t *restrict, wchar_t **restrict, int);
unsigned long wcstoul(const wchar_t *restrict, wchar_t **restrict, int);
unsigned long long
              wcstoull(const wchar_t *restrict, wchar_t **restrict, int);

wchar_t      *wcswcs(const wchar_t *, const wchar_t *);
int           wcswidth(const wchar_t *, size_t);

size_t        wcsxfrm(wchar_t *restrict, const wchar_t *restrict, size_t);
int           wctob(wint_t);

wctype_t      wctype(const char *);
int           wcwidth(wchar_t);

wchar_t      *wmemchr(const wchar_t *, wchar_t, size_t);
int           wmemcmp(const wchar_t *, const wchar_t *, size_t);
wchar_t      *wmemcpy(wchar_t *restrict, const wchar_t *restrict, size_t);
wchar_t      *wmemmove(wchar_t *, const wchar_t *, size_t);
wchar_t      *wmemset(wchar_t *, wchar_t, size_t);
int           wprintf(const wchar_t *restrict, ...);
int           wscanf(const wchar_t *restrict, ...);
\fP
.fi
.RE
.LP
The \fI<wchar.h>\fP header shall define the following macros:
.TP 7
WCHAR_MAX
The maximum value representable by an object of type \fBwchar_t\fP.
.TP 7
WCHAR_MIN
The minimum value representable by an object of type \fBwchar_t\fP.
.TP 7
WEOF
Constant expression of type \fBwint_t\fP that is returned by several
WP functions to indicate end-of-file.
.TP 7
NULL
As described in \fI<stddef.h>\fP .
.sp
.LP
The tag \fBtm\fP shall be declared as naming an incomplete structure
type, the contents of which are described in the header \fI<time.h>\fP
\&.
.LP
Inclusion of the \fI<wchar.h>\fP header may make visible all symbols
from the headers \fI<ctype.h>\fP, \fI<string.h>\fP, \fI<stdarg.h>\fP,
\fI<stddef.h>\fP, \fI<stdio.h>\fP, \fI<stdlib.h>\fP, and \fI<time.h>\fP.
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
The \fIiswblank\fP() function was a late addition to the ISO\ C standard
and was
introduced at the same time as the ISO\ C standard introduced \fI<wctype.h>\fP,
which contains all of the \fIisw*\fP() functions. The Open Group Base
Specifications had
previously aligned with the MSE working draft and had introduced the
rest of the \fIisw*\fP()
functions into \fI<wchar.h>\fP. For backwards-compatibility, the original
set of 
\fIisw*\fP() functions, without \fIiswblank\fP(), are
permitted (as an XSI extension) in \fI<wchar.h>\fP. For maximum portability,
applications should include \fI<wctype.h>\fP in order to obtain declarations
for the 
\fIisw*\fP() functions.
.SH RATIONALE
.LP
In the ISO\ C standard, the symbols referenced as XSI extensions are
in \fI<wctype.h>\fP. Their presence here is thus an extension.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fI<ctype.h>\fP , \fI<stdarg.h>\fP , \fI<stddef.h>\fP , \fI<stdio.h>\fP
, \fI<stdlib.h>\fP , \fI<string.h>\fP , \fI<time.h>\fP , \fI<wctype.h>\fP
, the System Interfaces volume of
IEEE\ Std\ 1003.1-2001, \fIbtowc\fP(), \fIconfstr\fP(), \fIfgetwc\fP(),
\fIfgetws\fP(), \fIfputwc\fP(), \fIfputws\fP(), \fIfwide\fP(), \fIfwprintf\fP(),
\fIfwscanf\fP(), \fIgetwc\fP(), \fIgetwchar\fP(), \fIiswalnum\fP(),
\fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(), \fIiswdigit\fP(),
\fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(), \fIiswpunct\fP(),
\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIiswctype\fP(),
\fImbsinit\fP(), \fImbrlen\fP(), \fImbrtowc\fP(), \fImbsrtowcs\fP(),
\fIputwc\fP(), \fIputwchar\fP(), \fIswprintf\fP(), \fIswscanf\fP(),
\fItowlower\fP(), \fItowupper\fP(), \fIungetwc\fP(), \fIvfwprintf\fP(),
\fIvfwscanf\fP(), \fIvswprintf\fP(), \fIvswscanf\fP(), \fIvwscanf\fP(),
\fIwcrtomb\fP(), \fIwcsrtombs\fP(), \fIwcscat\fP(), \fIwcschr\fP(),
\fIwcscmp\fP(), \fIwcscoll\fP(), \fIwcscpy\fP(), \fIwcscspn\fP(),
\fIwcsftime\fP(), \fIwcslen\fP(), \fIwcsncat\fP(), \fIwcsncmp\fP(),
\fIwcsncpy\fP(), \fIwcspbrk\fP(), \fIwcsrchr\fP(), \fIwcsspn\fP(),
\fIwcsstr\fP(), \fIwcstod\fP(), \fIwcstof\fP(), \fIwcstok\fP(), \fIwcstol\fP(),
\fIwcstold\fP(), \fIwcstoll\fP(), \fIwcstoul\fP(), \fIwcstoull\fP(),
\fIwcswcs\fP(), \fIwcswidth\fP(), \fIwcsxfrm\fP(), \fIwctob\fP(),
\fIwctype\fP(), \fIwcwidth\fP(), \fIwmemchr\fP(), \fIwmemcmp\fP(),
\fIwmemcpy\fP(), \fIwmemmove\fP(), \fIwmemset\fP(), \fIwprintf\fP(),
\fIwscanf\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
\fIgetconf\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .