aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt2021-02-27 14:08:35 +0100
committerHeinrich Schuchardt2021-03-07 17:37:12 +0100
commit70616a1ed8c7fe22aa19eb674915623bd236926f (patch)
treecb79eb8251582164aaec528bda11f443ee66a27b /lib
parent997b57fc1a375811af84bc1d18a5e59957b2a937 (diff)
efi_loader: move codepage 437 table
Move the Unicode to codepage 437 table to charset.c Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/charset.c6
-rw-r--r--lib/efi_loader/efi_unicode_collation.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/charset.c b/lib/charset.c
index 2177014ee1c..814847d1654 100644
--- a/lib/charset.c
+++ b/lib/charset.c
@@ -8,9 +8,15 @@
#include <common.h>
#include <charset.h>
#include <capitalization.h>
+#include <cp437.h>
#include <efi_loader.h>
#include <malloc.h>
+/**
+ * codepage_437 - Unicode to codepage 437 translation table
+ */
+const u16 codepage_437[128] = CP437;
+
static struct capitalization_table capitalization_table[] =
#ifdef CONFIG_EFI_UNICODE_CAPITALIZATION
UNICODE_CAPITALIZATION_TABLE;
diff --git a/lib/efi_loader/efi_unicode_collation.c b/lib/efi_loader/efi_unicode_collation.c
index f6c875bc33c..bf5314c4ff6 100644
--- a/lib/efi_loader/efi_unicode_collation.c
+++ b/lib/efi_loader/efi_unicode_collation.c
@@ -23,7 +23,7 @@ static const char illegal[] = "+,<=>:;\"/\\|?*[]\x7f";
static const u16 codepage[] = CP1250;
#else
/* Unicode code points for code page 437 characters 0x80 - 0xff */
-static const u16 codepage[] = CP437;
+static const u16 *codepage = codepage_437;
#endif
/* GUID of the EFI_UNICODE_COLLATION_PROTOCOL2 */