History log of /u-boot/include/charset.h
Revision Date Author Comments
# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <akashi.tkhro@gmail.com>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 AKASHI Takahiro <akashi.tkhro@gmail.com>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <akashi.tkhro@gmail.com>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 AKASHI Takahiro <akashi.tkhro@gmail.com>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# ac72d17f 16-Mar-2024 Janne Grunau <j@jannau.net>

lib/charset: Map Unicode code points to CP437 code points 1-31

Code page 437 uses code points 1-31 for glyphs instead of control
characters. Map the appropriate Unicode code points to this code points.
Fixes rendering of grub2's menu as EFI application using the
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

Signed-off-by: Janne Grunau <j@jannau.net>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <kojima.masahisa@socionext.com>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1a72acba 10-Feb-2024 Janne Grunau <j@jannau.net>

lib: charset: Fix and extend utf8_to_utf32_stream() documentation

Clarify usage of buffer argument.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 6c39d0ef 07-Jan-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

doc: fix description of u16_strcasecmp()

Remove non-existent parameter 'n' from function description.

Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7a9b366c 29-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# afbeedc8 16-May-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: fix compile warnings

This commit fixes the following compile warnings
for the documentation.

./include/charset.h:276: warning: Function parameter or member 'size' not described in 'u16_strlcat'
./include/charset.h:276: warning: Excess function parameter 'count' description in 'u16_strlcat'

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# eca08ce9 28-Apr-2022 Masahisa Kojima <masahisa.kojima@linaro.org>

lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 0121282d 02-Apr-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: convert u16_strlen() into a macro

The function u16_strlen() can be implemented as call to u16_strnlen().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 4bc4798f 28-Mar-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: documentation codepage_437[]

Variables cannot be documented via kernel-doc. Avoid 'make htmldocs' build
warning

./include/charset.h:19: warning:
cannot understand function prototype: 'const u16 codepage_437[128]; '

Fixes: 70616a1ed8c7 ("efi_loader: move codepage 437 table")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# e91789e2 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib/charset: UTF-8 stream conversion

Provide functions to convert an UTF-8 stream to code page 437 or UTF-32.

Add unit tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 73bb90ca 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: carve out utf_to_cp()

Carve out a function to translate a Unicode code point to an 8bit codepage.

Provide a unit test for the new function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 70616a1e 27-Feb-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: move codepage 437 table

Move the Unicode to codepage 437 table to charset.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 31393564 29-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: typo in function description of u16_strnlen

%/u16_strlen/u16_strnlen()/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 311da04a 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct function descriptions

Change function descriptions to match kernel doc style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 4835d35a 06-May-2020 Sughosh Ganu <sughosh.ganu@linaro.org>

charset: Add support for calculating bytes occupied by a u16 string

The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various
places to calculate the number of bytes occupied by a u16 string.
Let's introduce a wrapper around this. This wrapper is used on following
patches

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f8062c96 17-Sep-2019 AKASHI Takahiro <takahiro.akashi@linaro.org>

lib: charset: add u16_str<n>cmp()

u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
at most n characters (in u16) are compared.
This function will be used in my UEFI secure boot patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 317068b8 14-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support unaligned u16 strings

Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 8a4c443c 08-May-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 2a3537ae 14-Dec-2018 Akashi, Takahiro <takahiro.akashi@linaro.org>

lib: add u16_strcpy/strdup functions

Add u16_strcpy() and u16_strdup(). The latter function will be
used later in implementing efi HII database protocol.

Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 35cbb796 11-Sep-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: support Unicode text input

Up to now the EFI_TEXT_INPUT_PROTOCOL only supported ASCII characters.
With the patch it can consume UTF-8 from the console.

Currently only the serial console and the console can deliver UTF-8.
Local consoles are restricted to ASCII.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# b5130a81 04-Sep-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: upper/lower case conversion

Provide functions for upper and lower case conversion.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 75cb1cd2 31-Aug-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: remove obsolete functions

Remove functions:
- utf8_to_utf16()
- utf16_strcpy()
- utf16_strdup()

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# d8c28232 31-Aug-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

lib: charset: utility functions for Unicode

utf8_get() - get next UTF-8 code point from buffer
utf8_put() - write UTF-8 code point to buffer
utf8_utf16_strnlen() - length of a utf-8 string after conversion to utf-16
utf8_utf16_strncpy() - copy a utf-8 string to utf-16
utf16_get() - get next UTF-16 code point from buffer
utf16_put() - write UTF-16 code point to buffer
utf16_strnlen() - number of codes points in a utf-16 string
utf16_utf8_strnlen() - length of a utf-16 string after conversion to utf-8
utf16_utf8_strncpy() - copy a utf-16 string to utf-8

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 1dde0d57 31-Aug-2018 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: rename utf16_strlen, utf16_strnlen

The function names utf16_strlen() and utf16_strnlen() are misnomers.
The functions do not count utf-16 characters but non-zero words.
So let's rename them to u16_strlen and u16_strnlen().

In utf16_dup() avoid assignment in if clause.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# f739fcd8 07-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert a few files that were missed before

As part of the main conversion a few files were missed. These files had
additional whitespace after the '*' and before the SPDX tag and my
previous regex was too strict. This time I did a grep for all SPDX tags
and then filtered out anything that matched the correct styles.

Fixes: 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style")
Reported-by: Heinrich Schuchardt <xypron.debian@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>


# f58c5ecb 18-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: new function utf8_to_utf16

Provide a conversion function from utf8 to utf16.

Add missing #include <linux/types.h> in include/charset.h.
Remove superfluous #include <common.h> in lib/charset.c.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 984f251f 09-Oct-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: MAX_UTF8_PER_UTF16 = 3

The constant MAX_UTF8_PER_UTF16 is used to calculate
required memory when converting from UTF-16 to UTF-8.
If this constant is too big we waste memory.

A code point encoded by one UTF-16 symbol is converted to a
maximum of three UTF-8 symbols, e.g.

0xffff could be encoded as 0xef 0xbf 0xbf.
The first byte carries four bits, the second and third byte
carry six bits each.

A code point encoded by two UTF-16 symbols is converted to four
UTF-8 symbols.

So in this case we need a maximum of two UTF-8 symbols per
UTF-16 symbol.

As the overall maximum is three UTF-8 symobls per UTF-16 symbol
we need MAX_UTF8_PER_UTF16 = 3.

Fixes: 78178bb0c9d lib: add some utf16 handling helpers
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 78178bb0 09-Sep-2017 Rob Clark <robdclark@gmail.com>

lib: add some utf16 handling helpers

We'll eventually want these in a few places in efi_loader, and also
vsprintf.

Signed-off-by: Rob Clark <robdclark@gmail.com>