]>
Commit | Line | Data |
---|---|---|
2aa62f2b | 1 | /** @file\r |
2 | Extended multibyte and wide character utilities.\r | |
3 | \r | |
4 | Within this implementation, multibyte characters are represented using the\r | |
5 | Unicode UTF-8 encoding and wide characters are represented using the\r | |
6 | 16-bit UCS-2 encoding.\r | |
7 | \r | |
8 | Unless explicitly stated otherwise, if the execution of a function declared\r | |
9 | in this file causes copying to take place between objects that overlap, the\r | |
10 | behavior is undefined.\r | |
11 | \r | |
12 | Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r | |
13 | This program and the accompanying materials are licensed and made available under\r | |
14 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
15 | The full text of the license may be found at\r | |
16 | http://opensource.org/licenses/bsd-license.php.\r | |
17 | \r | |
18 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
19 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
20 | \r | |
21 | **/\r | |
22 | #ifndef _WCHAR_H\r | |
23 | #define _WCHAR_H\r | |
24 | #include <sys/EfiCdefs.h>\r | |
25 | #include <machine/ansi.h>\r | |
26 | #include <machine/limits.h>\r | |
27 | #include <stdarg.h>\r | |
28 | #include <stdio.h>\r | |
29 | \r | |
30 | #if defined(_MSC_VER)\r | |
31 | #pragma warning ( disable : 4142 )\r | |
32 | #endif\r | |
33 | \r | |
34 | #ifdef _EFI_SIZE_T_\r | |
35 | typedef _EFI_SIZE_T_ size_t;\r | |
36 | #undef _BSD_SIZE_T_\r | |
37 | #undef _EFI_SIZE_T_\r | |
38 | #endif\r | |
39 | \r | |
40 | #ifndef __cplusplus\r | |
41 | #ifdef _EFI_WCHAR_T\r | |
42 | typedef _EFI_WCHAR_T wchar_t;\r | |
43 | #undef _BSD_WCHAR_T_\r | |
44 | #undef _EFI_WCHAR_T\r | |
45 | #endif\r | |
46 | #endif\r | |
47 | \r | |
48 | /* mbstate_t is an opaque object, that must not be an array type, used to keep\r | |
49 | conversion state during multibyte stream conversions.\r | |
50 | */\r | |
51 | #ifdef _BSD_MBSTATE_T_\r | |
52 | typedef _BSD_MBSTATE_T_ mbstate_t;\r | |
53 | #undef _BSD_MBSTATE_T_\r | |
54 | #endif\r | |
55 | \r | |
56 | /* wint_t is an integer type unchanged by default argument promotions that can\r | |
57 | hold any value corresponding to members of the extended character set, as\r | |
58 | well as at least one value that does not correspond to any member of the\r | |
59 | extended character set: WEOF.\r | |
60 | */\r | |
61 | #ifdef _EFI_WINT_T\r | |
62 | typedef _EFI_WINT_T wint_t;\r | |
63 | #undef _BSD_WINT_T_\r | |
64 | #undef _EFI_WINT_T\r | |
65 | #endif\r | |
66 | \r | |
67 | /* Since wchar_t is an unsigned 16-bit value, it has a minimum value of 0, and\r | |
68 | a maximum value defined by __USHRT_MAX (65535 on IA processors).\r | |
69 | */\r | |
70 | #ifndef WCHAR_MIN\r | |
71 | #define WCHAR_MIN 0\r | |
72 | #define WCHAR_MAX __USHRT_MAX\r | |
73 | #endif\r | |
74 | \r | |
75 | /* limits of wint_t */\r | |
76 | #ifndef WINT_MIN\r | |
77 | #define WINT_MIN _EFI_WINT_MIN /* wint_t */\r | |
78 | #define WINT_MAX _EFI_WINT_MAX /* wint_t */\r | |
79 | #endif\r | |
80 | \r | |
81 | /* WEOF expands to a constant expression of type wint_t whose value does not\r | |
82 | correspond to any member of the extended character set. It is accepted\r | |
83 | (and returned) by several functions, declared in this file, to indicate\r | |
84 | end-of-file, that is, no more input from a stream. It is also used as a\r | |
85 | wide character value that does not correspond to any member of the\r | |
86 | extended character set.\r | |
87 | */\r | |
88 | #ifndef WEOF\r | |
89 | #define WEOF ((wint_t)-1)\r | |
90 | #endif\r | |
91 | \r | |
92 | /* tm is declared here as an incomplete structure type. The full structure\r | |
93 | declaration is in <time.h>.\r | |
94 | */\r | |
95 | struct tm;\r | |
96 | \r | |
97 | /* ############### Formatted Input/Output Functions ##################### */\r | |
98 | \r | |
99 | /**\r | |
100 | The fwprintf function writes output to the stream pointed to by stream, under\r | |
101 | control of the wide string pointed to by format that specifies how subsequent arguments\r | |
102 | are converted for output. If there are insufficient arguments for the format, the behavior\r | |
103 | is undefined. If the format is exhausted while arguments remain, the excess arguments\r | |
104 | are evaluated (as always) but are otherwise ignored. The fwprintf function returns\r | |
105 | when the end of the format string is encountered.\r | |
106 | \r | |
107 | The fwprintf function returns the number of wide characters transmitted, or a negative\r | |
108 | value if an output or encoding error occurred.\r | |
109 | **/\r | |
110 | int fwprintf(FILE * __restrict stream, const wchar_t * __restrict format, ...);\r | |
111 | \r | |
112 | /**\r | |
113 | The fwscanf function reads input from the stream pointed to by stream, under\r | |
114 | control of the wide string pointed to by format that specifies the admissible input\r | |
115 | sequences and how they are to be converted for assignment, using subsequent arguments\r | |
116 | as pointers to the objects to receive the converted input. If there are insufficient\r | |
117 | arguments for the format, the behavior is undefined. If the format is exhausted while\r | |
118 | arguments remain, the excess arguments are evaluated (as always) but are otherwise\r | |
119 | ignored.\r | |
120 | \r | |
121 | The fwscanf function returns the value of the macro EOF if an input failure occurs\r | |
122 | before any conversion. Otherwise, the function returns the number of input items\r | |
123 | assigned, which can be fewer than provided for, or even zero, in the event of an early\r | |
124 | matching failure.\r | |
125 | **/\r | |
126 | int fwscanf(FILE * __restrict stream, const wchar_t * __restrict format, ...);\r | |
127 | \r | |
128 | /**\r | |
129 | The swprintf function is equivalent to fwprintf, except that the argument s\r | |
130 | specifies an array of wide characters into which the generated output is to be written,\r | |
131 | rather than written to a stream. No more than n wide characters are written, including a\r | |
132 | terminating null wide character, which is always added (unless n is zero).\r | |
133 | \r | |
134 | The swprintf function returns the number of wide characters written in the array, not\r | |
135 | counting the terminating null wide character, or a neg ative value if an encoding error\r | |
136 | occurred or if n or more wide characters were requested to be written.\r | |
137 | **/\r | |
138 | int swprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict format, ...);\r | |
139 | \r | |
140 | /**\r | |
141 | **/\r | |
142 | int swscanf(const wchar_t * __restrict s, const wchar_t * __restrict format, ...);\r | |
143 | \r | |
144 | /**\r | |
145 | **/\r | |
146 | int vfwprintf(FILE * __restrict stream, const wchar_t * __restrict format, va_list arg);\r | |
147 | \r | |
148 | /**\r | |
149 | **/\r | |
150 | int vfwscanf(FILE * __restrict stream, const wchar_t * __restrict format, va_list arg);\r | |
151 | \r | |
152 | /**\r | |
153 | **/\r | |
154 | int vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict format, va_list arg);\r | |
155 | \r | |
156 | /**\r | |
157 | **/\r | |
158 | int vswscanf(const wchar_t * __restrict s, const wchar_t * __restrict format, va_list arg);\r | |
159 | \r | |
160 | /**\r | |
161 | **/\r | |
162 | int vwprintf(const wchar_t * __restrict format, va_list arg);\r | |
163 | \r | |
164 | /**\r | |
165 | **/\r | |
166 | int vwscanf(const wchar_t * __restrict format, va_list arg);\r | |
167 | \r | |
168 | /**\r | |
169 | **/\r | |
170 | int wprintf(const wchar_t * __restrict format, ...);\r | |
171 | \r | |
172 | /**\r | |
173 | **/\r | |
174 | int wscanf(const wchar_t * __restrict format, ...);\r | |
175 | \r | |
176 | /* ################### Input/Output Functions ########################### */\r | |
177 | \r | |
178 | \r | |
179 | /**\r | |
180 | **/\r | |
181 | wint_t fgetwc(FILE *stream);\r | |
182 | \r | |
183 | /**\r | |
184 | **/\r | |
185 | wchar_t *fgetws(wchar_t * __restrict s, int n, FILE * __restrict stream);\r | |
186 | \r | |
187 | /**\r | |
188 | **/\r | |
189 | wint_t fputwc(wchar_t c, FILE *stream);\r | |
190 | \r | |
191 | /**\r | |
192 | **/\r | |
193 | int fputws(const wchar_t * __restrict s, FILE * __restrict stream);\r | |
194 | \r | |
195 | /**\r | |
196 | **/\r | |
197 | int fwide(FILE *stream, int mode);\r | |
198 | \r | |
199 | /**\r | |
200 | **/\r | |
201 | wint_t getwc(FILE *stream);\r | |
202 | \r | |
203 | /**\r | |
204 | **/\r | |
205 | wint_t getwchar(void);\r | |
206 | \r | |
207 | /**\r | |
208 | **/\r | |
209 | wint_t putwc(wchar_t c, FILE *stream);\r | |
210 | \r | |
211 | /**\r | |
212 | **/\r | |
213 | wint_t putwchar(wchar_t c);\r | |
214 | \r | |
215 | /**\r | |
216 | **/\r | |
217 | wint_t ungetwc(wint_t c, FILE *stream);\r | |
218 | \r | |
219 | /* ################### Numeric Conversions ########################### */\r | |
220 | \r | |
221 | /**\r | |
222 | **/\r | |
223 | double wcstod(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr);\r | |
224 | \r | |
225 | /**\r | |
226 | **/\r | |
227 | float wcstof(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr);\r | |
228 | \r | |
229 | /**\r | |
230 | **/\r | |
231 | long double wcstold(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr);\r | |
232 | \r | |
233 | /**\r | |
234 | **/\r | |
235 | long int wcstol( const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base);\r | |
236 | \r | |
237 | /**\r | |
238 | **/\r | |
239 | long long int wcstoll( const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base);\r | |
240 | \r | |
241 | /**\r | |
242 | **/\r | |
243 | unsigned long int wcstoul( const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base);\r | |
244 | \r | |
245 | /**\r | |
246 | **/\r | |
247 | unsigned long long int wcstoull( const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base);\r | |
248 | \r | |
249 | /* ####################### String Copying ############################### */\r | |
250 | \r | |
251 | /** The wcscpy function copies the wide string pointed to by s2 (including the\r | |
252 | terminating null wide character) into the array pointed to by s1.\r | |
253 | \r | |
254 | @return The wcscpy function returns the value of s1.\r | |
255 | **/\r | |
256 | wchar_t *wcscpy(wchar_t * __restrict s1, const wchar_t * __restrict s2);\r | |
257 | \r | |
258 | /** The wcsncpy function copies not more than n wide characters (those that\r | |
259 | follow a null wide character are not copied) from the array pointed to by\r | |
260 | s2 to the array pointed to by s1.\r | |
261 | \r | |
262 | If the array pointed to by s2 is a wide string that is shorter than n wide\r | |
263 | characters, null wide characters are appended to the copy in the array\r | |
264 | pointed to by s1, until n wide characters in all have been written.\r | |
265 | \r | |
266 | @return The wcsncpy function returns the value of s1.\r | |
267 | **/\r | |
268 | wchar_t *wcsncpy(wchar_t * __restrict s1, const wchar_t * __restrict s2, size_t n);\r | |
269 | \r | |
270 | /** The wmemcpy function copies n wide characters from the object pointed to by\r | |
271 | s2 to the object pointed to by s1.\r | |
272 | \r | |
273 | Use this function if you know that s1 and s2 DO NOT Overlap. Otherwise,\r | |
274 | use wmemmove.\r | |
275 | \r | |
276 | @return The wmemcpy function returns the value of s1.\r | |
277 | **/\r | |
278 | wchar_t *wmemcpy(wchar_t * __restrict s1, const wchar_t * __restrict s2, size_t n);\r | |
279 | \r | |
280 | /** The wmemmove function copies n wide characters from the object pointed to by\r | |
281 | s2 to the object pointed to by s1. The objects pointed to by s1 and s2 are\r | |
282 | allowed to overlap.\r | |
283 | \r | |
284 | Because the UEFI BaseMemoryLib function CopyMem explicitly handles\r | |
285 | overlapping source and destination objects, this function and wmemcpy are\r | |
286 | implemented identically.\r | |
287 | \r | |
288 | For programming clarity, it is recommended that you use wmemcpy if you know\r | |
289 | that s1 and s2 DO NOT Overlap. If s1 and s2 might possibly overlap, then\r | |
290 | use wmemmove.\r | |
291 | \r | |
292 | @return The wmemmove function returns the value of s1.\r | |
293 | **/\r | |
294 | wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);\r | |
295 | \r | |
296 | /* ################### String Concatenation ########################## */\r | |
297 | \r | |
298 | /** The wcscat function appends a copy of the wide string pointed to by s2\r | |
299 | (including the terminating null wide character) to the end of the wide\r | |
300 | string pointed to by s1. The initial wide character of s2 overwrites the\r | |
301 | null wide character at the end of s1.\r | |
302 | \r | |
303 | @return The wcscat function returns the value of s1.\r | |
304 | **/\r | |
305 | wchar_t *wcscat(wchar_t * __restrict s1, const wchar_t * __restrict s2);\r | |
306 | \r | |
307 | /** The wcsncat function appends not more than n wide characters (a null wide\r | |
308 | character and those that follow it are not appended) from the array pointed\r | |
309 | to by s2 to the end of the wide string pointed to by s1. The initial wide\r | |
310 | character of s2 overwrites the null wide character at the end of s1.\r | |
311 | A terminating null wide character is always appended to the result.\r | |
312 | \r | |
313 | @return The wcsncat function returns the value of s1.\r | |
314 | **/\r | |
315 | wchar_t *wcsncat(wchar_t * __restrict s1, const wchar_t * __restrict s2, size_t n);\r | |
316 | \r | |
317 | /* ##################### String Comparison ############################# */\r | |
318 | \r | |
319 | /** The wcscmp function compares the wide string pointed to by s1 to the wide\r | |
320 | string pointed to by s2.\r | |
321 | \r | |
322 | @return The wcscmp function returns an integer greater than, equal to, or\r | |
323 | less than zero, accordingly as the wide string pointed to by s1\r | |
324 | is greater than, equal to, or less than the wide string\r | |
325 | pointed to by s2.\r | |
326 | **/\r | |
327 | int wcscmp(const wchar_t *s1, const wchar_t *s2);\r | |
328 | \r | |
329 | /** The wcscoll function compares the wide string pointed to by s1 to the wide\r | |
330 | string pointed to by s2, both interpreted as appropriate to the LC_COLLATE\r | |
331 | category of the current locale.\r | |
332 | \r | |
333 | @return The wcscoll function returns an integer greater than, equal to,\r | |
334 | or less than zero, accordingly as the wide string pointed to by\r | |
335 | s1 is greater than, equal to, or less than the wide string\r | |
336 | pointed to by s2 when both are interpreted as appropriate to\r | |
337 | the current locale.\r | |
338 | **/\r | |
339 | int wcscoll(const wchar_t *s1, const wchar_t *s2);\r | |
340 | \r | |
341 | /** The wcsncmp function compares not more than n wide characters (those that\r | |
342 | follow a null wide character are not compared) from the array pointed to by\r | |
343 | s1 to the array pointed to by s2.\r | |
344 | \r | |
345 | @return The wcsncmp function returns an integer greater than, equal to,\r | |
346 | or less than zero, accordingly as the possibly null-terminated\r | |
347 | array pointed to by s1 is greater than, equal to, or less than\r | |
348 | the possibly null-terminated array pointed to by s2.\r | |
349 | **/\r | |
350 | int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);\r | |
351 | \r | |
352 | /** The wcsxfrm function transforms the wide string pointed to by s2 and places\r | |
353 | the resulting wide string into the array pointed to by s1. The\r | |
354 | transformation is such that if the wcscmp function is applied to two\r | |
355 | transformed wide strings, it returns a value greater than, equal to, or\r | |
356 | less than zero, corresponding to the result of the wcscoll function applied\r | |
357 | to the same two original wide strings. No more than n wide characters are\r | |
358 | placed into the resulting array pointed to by s1, including the terminating\r | |
359 | null wide character. If n is zero, s1 is permitted to be a null pointer.\r | |
360 | \r | |
361 | @return The wcsxfrm function returns the length of the transformed wide\r | |
362 | string (not including the terminating null wide character). If\r | |
363 | the value returned is n or greater, the contents of the array\r | |
364 | pointed to by s1 are indeterminate.\r | |
365 | **/\r | |
366 | size_t wcsxfrm(wchar_t * __restrict s1, const wchar_t * __restrict s2, size_t n);\r | |
367 | \r | |
368 | /** The wmemcmp function compares the first n wide characters of the object\r | |
369 | pointed to by s1 to the first n wide characters of the object pointed to\r | |
370 | by s2.\r | |
371 | \r | |
372 | @return The wmemcmp function returns an integer greater than, equal to,\r | |
373 | or less than zero, accordingly as the object pointed to by s1 is\r | |
374 | greater than, equal to, or less than the object pointed to by s2.\r | |
375 | **/\r | |
376 | int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n);\r | |
377 | \r | |
378 | /* ##################### String Searching ############################## */\r | |
379 | \r | |
380 | /** The wcschr function locates the first occurrence of c in the wide string\r | |
381 | pointed to by s. The terminating null wide character is considered to be\r | |
382 | part of the wide string.\r | |
383 | \r | |
384 | @return The wcschr function returns a pointer to the located wide\r | |
385 | character, or a null pointer if the wide character does not occur\r | |
386 | in the wide string.\r | |
387 | **/\r | |
388 | wchar_t *wcschr(const wchar_t *s, wchar_t c);\r | |
389 | \r | |
390 | /** The wcscspn function computes the length of the maximum initial segment of\r | |
391 | the wide string pointed to by s1 which consists entirely of wide characters\r | |
392 | not from the wide string pointed to by s2.\r | |
393 | \r | |
394 | @return The wcscspn function returns the length of the segment.\r | |
395 | **/\r | |
396 | size_t wcscspn(const wchar_t *s1, const wchar_t *s2);\r | |
397 | \r | |
398 | /** The wcspbrk function locates the first occurrence in the wide string\r | |
399 | pointed to by s1 of any wide character from the wide string\r | |
400 | pointed to by s2.\r | |
401 | \r | |
402 | @return The wcspbrk function returns a pointer to the wide character\r | |
403 | in s1, or a null pointer if no wide character from s2 occurs\r | |
404 | in s1.\r | |
405 | **/\r | |
406 | wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2);\r | |
407 | \r | |
408 | /** The wcsrchr function locates the last occurrence of c in the wide string\r | |
409 | pointed to by s. The terminating null wide character is considered to be\r | |
410 | part of the wide string.\r | |
411 | \r | |
412 | @return The wcsrchr function returns a pointer to the wide character,\r | |
413 | or a null pointer if c does not occur in the wide string.\r | |
414 | **/\r | |
415 | wchar_t *wcsrchr(const wchar_t *s, wchar_t c);\r | |
416 | \r | |
417 | /** The wcsspn function computes the length of the maximum initial segment of\r | |
418 | the wide string pointed to by s1 which consists entirely of wide characters\r | |
419 | from the wide string pointed to by s2.\r | |
420 | \r | |
421 | @return The wcsspn function returns the length of the segment.\r | |
422 | **/\r | |
423 | size_t wcsspn(const wchar_t *s1, const wchar_t *s2);\r | |
424 | \r | |
425 | /** The wcsstr function locates the first occurrence in the wide string pointed\r | |
426 | to by s1 of the sequence of wide characters (excluding the terminating null\r | |
427 | wide character) in the wide string pointed to by s2.\r | |
428 | \r | |
429 | @return The wcsstr function returns a pointer to the located wide string,\r | |
430 | or a null pointer if the wide string is not found. If s2 points\r | |
431 | to a wide string with zero length, the function returns s1.\r | |
432 | **/\r | |
433 | wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2);\r | |
434 | \r | |
435 | /** A sequence of calls to the wcstok function breaks the wide string pointed\r | |
436 | to by s1 into a sequence of tokens, each of which is delimited by a wide\r | |
437 | character from the wide string pointed to by s2. The third argument points\r | |
438 | to a caller-provided wchar_t pointer into which the wcstok function stores\r | |
439 | information necessary for it to continue scanning the same wide string.\r | |
440 | \r | |
441 | The first call in a sequence has a non-null first argument and stores an\r | |
442 | initial value in the object pointed to by ptr. Subsequent calls in the\r | |
443 | sequence have a null first argument and the object pointed to by ptr is\r | |
444 | required to have the value stored by the previous call in the sequence,\r | |
445 | which is then updated. The separator wide string pointed to by s2 may be\r | |
446 | different from call to call.\r | |
447 | \r | |
448 | The first call in the sequence searches the wide string pointed to by s1\r | |
449 | for the first wide character that is not contained in the current separator\r | |
450 | wide string pointed to by s2. If no such wide character is found, then\r | |
451 | there are no tokens in the wide string pointed to by s1 and the wcstok\r | |
452 | function returns a null pointer. If such a wide character is found, it is\r | |
453 | the start of the first token.\r | |
454 | \r | |
455 | The wcstok function then searches from there for a wide character that is\r | |
456 | contained in the current separator wide string. If no such wide character\r | |
457 | is found, the current token extends to the end of the wide string pointed\r | |
458 | to by s1, and subsequent searches in the same wide string for a token\r | |
459 | return a null pointer. If such a wide character is found, it is overwritten\r | |
460 | by a null wide character, which terminates the current token.\r | |
461 | \r | |
462 | In all cases, the wcstok function stores sufficient information in the\r | |
463 | pointer pointed to by ptr so that subsequent calls, with a null pointer for\r | |
464 | s1 and the unmodified pointer value for ptr, shall start searching just\r | |
465 | past the element overwritten by a null wide character (if any).\r | |
466 | \r | |
467 | @return The wcstok function returns a pointer to the first wide character\r | |
468 | of a token, or a null pointer if there is no token.\r | |
469 | **/\r | |
470 | wchar_t *wcstok(wchar_t * __restrict s1, const wchar_t * __restrict s2, wchar_t ** __restrict ptr);\r | |
471 | \r | |
472 | /** The wmemchr function locates the first occurrence of c in the initial n\r | |
473 | wide characters of the object pointed to by s.\r | |
474 | \r | |
475 | @return The wmemchr function returns a pointer to the located wide\r | |
476 | character, or a null pointer if the wide character does not occur\r | |
477 | in the object.\r | |
478 | **/\r | |
479 | wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n);\r | |
480 | \r | |
481 | /* ################### String Manipulation ############################# */\r | |
482 | \r | |
483 | /** The wcslen function computes the length of the wide string pointed to by s.\r | |
484 | \r | |
485 | @return The wcslen function returns the number of wide characters that\r | |
486 | precede the terminating null wide character.\r | |
487 | **/\r | |
488 | size_t wcslen(const wchar_t *s);\r | |
489 | \r | |
490 | /** The wmemset function copies the value of c into each of the first n wide\r | |
491 | characters of the object pointed to by s.\r | |
492 | \r | |
493 | @return The wmemset function returns the value of s.\r | |
494 | **/\r | |
495 | wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n);\r | |
496 | \r | |
497 | /* ################# Date and Time Conversion ########################### */\r | |
498 | \r | |
499 | /**\r | |
500 | **/\r | |
501 | size_t wcsftime(wchar_t * __restrict s, size_t maxsize, const wchar_t * __restrict format, const struct tm * __restrict timeptr);\r | |
502 | \r | |
503 | /* ############# Multibyte <--> Wide Character Conversion ############### */\r | |
504 | \r | |
505 | /**\r | |
506 | **/\r | |
507 | wint_t btowc(int c);\r | |
508 | \r | |
509 | /**\r | |
510 | **/\r | |
511 | int wctob(wint_t c);\r | |
512 | \r | |
513 | /**\r | |
514 | **/\r | |
515 | int mbsinit(const mbstate_t *ps);\r | |
516 | \r | |
517 | /* ####### Restartable Multibyte <--> Wide Character Conversion ######### */\r | |
518 | \r | |
519 | /**\r | |
520 | **/\r | |
521 | size_t mbrlen(const char * __restrict s, size_t n, mbstate_t * __restrict ps);\r | |
522 | \r | |
523 | /**\r | |
524 | **/\r | |
525 | size_t mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, mbstate_t * __restrict ps);\r | |
526 | \r | |
527 | /**\r | |
528 | **/\r | |
529 | size_t wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps);\r | |
530 | \r | |
531 | /**\r | |
532 | **/\r | |
533 | size_t mbsrtowcs(wchar_t * __restrict dst, const char ** __restrict src, size_t len, mbstate_t * __restrict ps);\r | |
534 | \r | |
535 | /**\r | |
536 | **/\r | |
537 | size_t wcsrtombs(char * __restrict dst, const wchar_t ** __restrict src, size_t len, mbstate_t * __restrict ps);\r | |
538 | \r | |
539 | #endif /* _WCHAR_H */\r |