]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/Include/wchar.h
Fix @return Doxygen commands to be singular instead of plural.
[mirror_edk2.git] / StdLib / Include / wchar.h
CommitLineData
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
95struct tm;\r
96\r
97/* ############### Formatted Input/Output Functions ##################### */\r
98\r
99/**\r
100The fwprintf function writes output to the stream pointed to by stream, under\r
101control of the wide string pointed to by format that specifies how subsequent arguments\r
102are converted for output. If there are insufficient arguments for the format, the behavior\r
103is undefined. If the format is exhausted while arguments remain, the excess arguments\r
104are evaluated (as always) but are otherwise ignored. The fwprintf function returns\r
105when the end of the format string is encountered.\r
106\r
107The fwprintf function returns the number of wide characters transmitted, or a negative\r
108value if an output or encoding error occurred.\r
109**/\r
110int fwprintf(FILE * __restrict stream, const wchar_t * __restrict format, ...);\r
111\r
112/**\r
113The fwscanf function reads input from the stream pointed to by stream, under\r
114control of the wide string pointed to by format that specifies the admissible input\r
115sequences and how they are to be converted for assignment, using subsequent arguments\r
116as pointers to the objects to receive the converted input. If there are insufficient\r
117arguments for the format, the behavior is undefined. If the format is exhausted while\r
118arguments remain, the excess arguments are evaluated (as always) but are otherwise\r
119ignored.\r
120\r
121The fwscanf function returns the value of the macro EOF if an input failure occurs\r
122before any conversion. Otherwise, the function returns the number of input items\r
123assigned, which can be fewer than provided for, or even zero, in the event of an early\r
124matching failure.\r
125**/\r
126int fwscanf(FILE * __restrict stream, const wchar_t * __restrict format, ...);\r
127\r
128/**\r
129The swprintf function is equivalent to fwprintf, except that the argument s\r
130specifies an array of wide characters into which the generated output is to be written,\r
131rather than written to a stream. No more than n wide characters are written, including a\r
132terminating null wide character, which is always added (unless n is zero).\r
133\r
134The swprintf function returns the number of wide characters written in the array, not\r
135counting the terminating null wide character, or a neg ative value if an encoding error\r
136occurred or if n or more wide characters were requested to be written.\r
137**/\r
138int swprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict format, ...);\r
139\r
140/**\r
141**/\r
142int swscanf(const wchar_t * __restrict s, const wchar_t * __restrict format, ...);\r
143\r
144/**\r
145**/\r
146int vfwprintf(FILE * __restrict stream, const wchar_t * __restrict format, va_list arg);\r
147\r
148/**\r
149**/\r
150int vfwscanf(FILE * __restrict stream, const wchar_t * __restrict format, va_list arg);\r
151\r
152/**\r
153**/\r
154int vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict format, va_list arg);\r
155\r
156/**\r
157**/\r
158int vswscanf(const wchar_t * __restrict s, const wchar_t * __restrict format, va_list arg);\r
159\r
160/**\r
161**/\r
162int vwprintf(const wchar_t * __restrict format, va_list arg);\r
163\r
164/**\r
165**/\r
166int vwscanf(const wchar_t * __restrict format, va_list arg);\r
167\r
168/**\r
169**/\r
170int wprintf(const wchar_t * __restrict format, ...);\r
171\r
172/**\r
173**/\r
174int wscanf(const wchar_t * __restrict format, ...);\r
175\r
176/* ################### Input/Output Functions ########################### */\r
177\r
178\r
179/**\r
180**/\r
181wint_t fgetwc(FILE *stream);\r
182\r
183/**\r
184**/\r
185wchar_t *fgetws(wchar_t * __restrict s, int n, FILE * __restrict stream);\r
186\r
187/**\r
188**/\r
189wint_t fputwc(wchar_t c, FILE *stream);\r
190\r
191/**\r
192**/\r
193int fputws(const wchar_t * __restrict s, FILE * __restrict stream);\r
194\r
195/**\r
196**/\r
197int fwide(FILE *stream, int mode);\r
198\r
199/**\r
200**/\r
201wint_t getwc(FILE *stream);\r
202\r
203/**\r
204**/\r
205wint_t getwchar(void);\r
206\r
207/**\r
208**/\r
209wint_t putwc(wchar_t c, FILE *stream);\r
210\r
211/**\r
212**/\r
213wint_t putwchar(wchar_t c);\r
214\r
215/**\r
216**/\r
217wint_t ungetwc(wint_t c, FILE *stream);\r
218\r
219/* ################### Numeric Conversions ########################### */\r
220\r
221/**\r
222**/\r
223double wcstod(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr);\r
224\r
225/**\r
226**/\r
227float wcstof(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr);\r
228\r
229/**\r
230**/\r
231long double wcstold(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr);\r
232\r
233/**\r
234**/\r
235long int wcstol( const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base);\r
236\r
237/**\r
238**/\r
239long long int wcstoll( const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base);\r
240\r
241/**\r
242**/\r
243unsigned long int wcstoul( const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base);\r
244\r
245/**\r
246**/\r
247unsigned 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
256wchar_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
268wchar_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
278wchar_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
294wchar_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
305wchar_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
315wchar_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
327int 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
339int 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
350int 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
366size_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
376int 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
388wchar_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
396size_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
406wchar_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
415wchar_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
423size_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
433wchar_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
470wchar_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
479wchar_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
488size_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
495wchar_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
501size_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
507wint_t btowc(int c);\r
508\r
53e1e5c6 509/** The wctob function determines whether c corresponds to a member of the extended\r
510 character set whose multibyte character representation is a single byte when in the initial\r
511 shift state.\r
512\r
7dc13291 513 @return The wctob function returns EOF if c does not correspond to a multibyte\r
53e1e5c6 514 character with length one in the initial shift state. Otherwise, it\r
515 returns the single-byte representation of that character as an\r
516 unsigned char converted to an int.\r
2aa62f2b 517**/\r
518int wctob(wint_t c);\r
519\r
53e1e5c6 520/** If ps is not a null pointer, the mbsinit function determines whether the\r
521 pointed-to mbstate_t object describes an initial conversion state.\r
522\r
7dc13291 523 @return The mbsinit function returns nonzero if ps is a null pointer\r
53e1e5c6 524 or if the pointed-to object describes an initial conversion\r
525 state; otherwise, it returns zero.\r
2aa62f2b 526**/\r
527int mbsinit(const mbstate_t *ps);\r
528\r
529/* ####### Restartable Multibyte <--> Wide Character Conversion ######### */\r
530\r
531/**\r
532**/\r
533size_t mbrlen(const char * __restrict s, size_t n, mbstate_t * __restrict ps);\r
534\r
535/**\r
536**/\r
537size_t mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, mbstate_t * __restrict ps);\r
538\r
539/**\r
540**/\r
541size_t wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps);\r
542\r
543/**\r
544**/\r
545size_t mbsrtowcs(wchar_t * __restrict dst, const char ** __restrict src, size_t len, mbstate_t * __restrict ps);\r
546\r
53e1e5c6 547/** The wcsrtombs function converts a sequence of wide characters from the array\r
548 indirectly pointed to by src into a sequence of corresponding multibyte\r
549 characters that begins in the conversion state described by the object\r
550 pointed to by ps. If dst is not a null pointer, the converted characters\r
551 are then stored into the array pointed to by dst. Conversion continues\r
552 up to and including a terminating null wide character, which is also\r
553 stored. Conversion stops earlier in two cases: when a wide character is\r
554 reached that does not correspond to a valid multibyte character, or\r
555 (if dst is not a null pointer) when the next multibyte character would\r
556 exceed the limit of len total bytes to be stored into the array pointed\r
557 to by dst. Each conversion takes place as if by a call to the wcrtomb\r
558 function.)\r
559\r
560 If dst is not a null pointer, the pointer object pointed to by src is\r
561 assigned either a null pointer (if conversion stopped due to reaching\r
562 a terminating null wide character) or the address just past the last wide\r
563 character converted (if any). If conversion stopped due to reaching a\r
564 terminating null wide character, the resulting state described is the\r
565 initial conversion state.\r
566\r
7dc13291 567 @return If conversion stops because a wide character is reached that\r
53e1e5c6 568 does not correspond to a valid multibyte character, an\r
569 encoding error occurs: the wcsrtombs function stores the\r
570 value of the macro EILSEQ in errno and returns (size_t)(-1);\r
571 the conversion state is unspecified. Otherwise, it returns\r
572 the number of bytes in the resulting multibyte character\r
573 sequence, not including the terminating null character (if any).\r
2aa62f2b 574**/\r
575size_t wcsrtombs(char * __restrict dst, const wchar_t ** __restrict src, size_t len, mbstate_t * __restrict ps);\r
576\r
577#endif /* _WCHAR_H */\r