]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/Include/wchar.h
Add device abstraction code for the UEFI Console and UEFI Shell-based file systems.
[mirror_edk2.git] / StdLib / Include / wchar.h
index 360bdacc32698082d4721ad2b6530a049e64d537..c42594787d9a111f0d78287f2acb2c4d6f0a5c55 100644 (file)
@@ -506,11 +506,23 @@ size_t wcsftime(wchar_t * __restrict s, size_t maxsize, const wchar_t * __restri
 **/\r
 wint_t btowc(int c);\r
 \r
-/**\r
+/** The wctob function determines whether c corresponds to a member of the extended\r
+    character set whose multibyte character representation is a single byte when in the initial\r
+    shift state.\r
+\r
+    @Returns    The wctob function returns EOF if c does not correspond to a multibyte\r
+                character with length one in the initial shift state. Otherwise, it\r
+                returns the single-byte representation of that character as an\r
+                unsigned char converted to an int.\r
 **/\r
 int wctob(wint_t c);\r
 \r
-/**\r
+/** If ps is not a null pointer, the mbsinit function determines whether the\r
+    pointed-to mbstate_t object describes an initial conversion state.\r
+\r
+    @Returns    The mbsinit function returns nonzero if ps is a null pointer\r
+                or if the pointed-to object describes an initial conversion\r
+                state; otherwise, it returns zero.\r
 **/\r
 int mbsinit(const mbstate_t *ps);\r
 \r
@@ -532,7 +544,33 @@ size_t wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps);
 **/\r
 size_t mbsrtowcs(wchar_t * __restrict dst, const char ** __restrict src, size_t len, mbstate_t * __restrict ps);\r
 \r
-/**\r
+/** The wcsrtombs function converts a sequence of wide characters from the array\r
+    indirectly pointed to by src into a sequence of corresponding multibyte\r
+    characters that begins in the conversion state described by the object\r
+    pointed to by ps. If dst is not a null pointer, the converted characters\r
+    are then stored into the array pointed to by dst.  Conversion continues\r
+    up to and including a terminating null wide character, which is also\r
+    stored. Conversion stops earlier in two cases: when a wide character is\r
+    reached that does not correspond to a valid multibyte character, or\r
+    (if dst is not a null pointer) when the next multibyte character would\r
+    exceed the limit of len total bytes to be stored into the array pointed\r
+    to by dst. Each conversion takes place as if by a call to the wcrtomb\r
+    function.)\r
+\r
+    If dst is not a null pointer, the pointer object pointed to by src is\r
+    assigned either a null pointer (if conversion stopped due to reaching\r
+    a terminating null wide character) or the address just past the last wide\r
+    character converted (if any). If conversion stopped due to reaching a\r
+    terminating null wide character, the resulting state described is the\r
+    initial conversion state.\r
+\r
+    @Returns    If conversion stops because a wide character is reached that\r
+                does not correspond to a valid multibyte character, an\r
+                encoding error occurs: the wcsrtombs function stores the\r
+                value of the macro EILSEQ in errno and returns (size_t)(-1);\r
+                the conversion state is unspecified. Otherwise, it returns\r
+                the number of bytes in the resulting multibyte character\r
+                sequence, not including the terminating null character (if any).\r
 **/\r
 size_t wcsrtombs(char * __restrict dst, const wchar_t ** __restrict src, size_t len, mbstate_t * __restrict ps);\r
 \r