18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * consolemap.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Interface between console.c, selection.c and consolemap.c 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci#ifndef __LINUX_CONSOLEMAP_H__ 88c2ecf20Sopenharmony_ci#define __LINUX_CONSOLEMAP_H__ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#define LAT1_MAP 0 118c2ecf20Sopenharmony_ci#define GRAF_MAP 1 128c2ecf20Sopenharmony_ci#define IBMPC_MAP 2 138c2ecf20Sopenharmony_ci#define USER_MAP 3 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include <linux/types.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#ifdef CONFIG_CONSOLE_TRANSLATIONS 188c2ecf20Sopenharmony_cistruct vc_data; 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciextern u16 inverse_translate(const struct vc_data *conp, int glyph, 218c2ecf20Sopenharmony_ci int use_unicode); 228c2ecf20Sopenharmony_ciextern unsigned short *set_translate(int m, struct vc_data *vc); 238c2ecf20Sopenharmony_ciextern int conv_uni_to_pc(struct vc_data *conp, long ucs); 248c2ecf20Sopenharmony_ciextern u32 conv_8bit_to_uni(unsigned char c); 258c2ecf20Sopenharmony_ciextern int conv_uni_to_8bit(u32 uni); 268c2ecf20Sopenharmony_civoid console_map_init(void); 278c2ecf20Sopenharmony_ci#else 288c2ecf20Sopenharmony_ci#define inverse_translate(conp, glyph, uni) ((uint16_t)glyph) 298c2ecf20Sopenharmony_ci#define set_translate(m, vc) ((unsigned short *)NULL) 308c2ecf20Sopenharmony_ci#define conv_uni_to_pc(conp, ucs) ((int) (ucs > 0xff ? -1: ucs)) 318c2ecf20Sopenharmony_ci#define conv_8bit_to_uni(c) ((uint32_t)(c)) 328c2ecf20Sopenharmony_ci#define conv_uni_to_8bit(c) ((int) ((c) & 0xff)) 338c2ecf20Sopenharmony_ci#define console_map_init(c) do { ; } while (0) 348c2ecf20Sopenharmony_ci#endif /* CONFIG_CONSOLE_TRANSLATIONS */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#endif /* __LINUX_CONSOLEMAP_H__ */ 37