0001
0002
0003
0004
0005
0006
0007 #ifndef __LINUX_CONSOLEMAP_H__
0008 #define __LINUX_CONSOLEMAP_H__
0009
0010 enum translation_map {
0011 LAT1_MAP,
0012 GRAF_MAP,
0013 IBMPC_MAP,
0014 USER_MAP,
0015
0016 FIRST_MAP = LAT1_MAP,
0017 LAST_MAP = USER_MAP,
0018 };
0019
0020 #include <linux/types.h>
0021
0022 struct vc_data;
0023
0024 #ifdef CONFIG_CONSOLE_TRANSLATIONS
0025 u16 inverse_translate(const struct vc_data *conp, u16 glyph, bool use_unicode);
0026 unsigned short *set_translate(enum translation_map m, struct vc_data *vc);
0027 int conv_uni_to_pc(struct vc_data *conp, long ucs);
0028 u32 conv_8bit_to_uni(unsigned char c);
0029 int conv_uni_to_8bit(u32 uni);
0030 void console_map_init(void);
0031 #else
0032 static inline u16 inverse_translate(const struct vc_data *conp, u16 glyph,
0033 bool use_unicode)
0034 {
0035 return glyph;
0036 }
0037
0038 static inline unsigned short *set_translate(enum translation_map m,
0039 struct vc_data *vc)
0040 {
0041 return NULL;
0042 }
0043
0044 static inline int conv_uni_to_pc(struct vc_data *conp, long ucs)
0045 {
0046 return ucs > 0xff ? -1 : ucs;
0047 }
0048
0049 static inline u32 conv_8bit_to_uni(unsigned char c)
0050 {
0051 return c;
0052 }
0053
0054 static inline int conv_uni_to_8bit(u32 uni)
0055 {
0056 return uni & 0xff;
0057 }
0058
0059 static inline void console_map_init(void) { }
0060 #endif
0061
0062 #endif