diff options
| author | Tom Rini <[email protected]> | 2024-02-12 15:22:05 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-02-12 15:22:05 -0500 |
| commit | 73b5b47dd5b546d0b9106bcca54c72815380e6d3 (patch) | |
| tree | 347bf71809965d00f7d709b175930e78f82ce710 /include | |
| parent | a5f877a0bd64af97dbc812c9a0a8d7d6a353d943 (diff) | |
| parent | 2eb39c9adafb4210c6bcf0aed75a34493c098c8e (diff) | |
Merge tag 'doc-2024-04-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request doc-2024-04-rc2
Documentation:
* Fix and extend utf8_to_utf32_stream() documentation
* Fix rendering of OpenSBI logo in VisionFive 2 description
* Document imxrt1170-evk board
* codingstyle.rst: Clarify include section
UEFI:
* simplify error message in efi_disk_create_raw()
Diffstat (limited to 'include')
| -rw-r--r-- | include/charset.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/charset.h b/include/charset.h index 44034c71d3d..f1050c903d6 100644 --- a/include/charset.h +++ b/include/charset.h @@ -324,11 +324,21 @@ int utf_to_cp(s32 *c, const u16 *codepage); int utf8_to_cp437_stream(u8 c, char *buffer); /** - * utf8_to_utf32_stream() - convert UTF-8 stream to UTF-32 + * utf8_to_utf32_stream() - convert UTF-8 byte stream to Unicode code points + * + * The function is called for each byte @c in a UTF-8 stream. The byte is + * appended to the temporary storage @buffer until the UTF-8 stream in + * @buffer describes a Unicode code point. + * + * When a new code point has been decoded it is returned and buffer[0] is + * set to '\0', otherwise the return value is 0. + * + * The buffer must be at least 5 characters long. Before the first function + * invocation buffer[0] must be set to '\0'." * * @c: next UTF-8 character to convert * @buffer: buffer, at least 5 characters - * Return: next codepage 437 character or 0 + * Return: Unicode code point or 0 */ int utf8_to_utf32_stream(u8 c, char *buffer); |
