summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNicolas Pitre <npitre@baylibre.com>2025-04-10 04:13:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-11 17:55:54 +0300
commit2acaf27cd7f4f32bfe8bf7335690618e2417e744 (patch)
tree63c1407973c9170b166b6fae01a6be4f6e71ea1c /include/linux
parent74045f6658f11241a09d93404d79828cc99e94dc (diff)
downloadlinux-2acaf27cd7f4f32bfe8bf7335690618e2417e744.tar.xz
vt: move unicode processing to a separate file
This will make it easier to maintain. Also make it depend on CONFIG_CONSOLE_TRANSLATIONS. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/20250410011839.64418-3-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/consolemap.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/consolemap.h b/include/linux/consolemap.h
index c35db4896c37..caf079bcb8c9 100644
--- a/include/linux/consolemap.h
+++ b/include/linux/consolemap.h
@@ -28,6 +28,7 @@ int conv_uni_to_pc(struct vc_data *conp, long ucs);
u32 conv_8bit_to_uni(unsigned char c);
int conv_uni_to_8bit(u32 uni);
void console_map_init(void);
+bool ucs_is_double_width(uint32_t cp);
#else
static inline u16 inverse_translate(const struct vc_data *conp, u16 glyph,
bool use_unicode)
@@ -57,6 +58,11 @@ static inline int conv_uni_to_8bit(u32 uni)
}
static inline void console_map_init(void) { }
+
+static inline bool ucs_is_double_width(uint32_t cp)
+{
+ return false;
+}
#endif /* CONFIG_CONSOLE_TRANSLATIONS */
#endif /* __LINUX_CONSOLEMAP_H__ */