@@ -16,9 +16,9 @@ int kbd_mode_main(int argc UNUSED_PARAM, char **argv)
|
||||
{
|
||||
enum {
|
||||
SCANCODE = (1 << 0),
|
||||
ASCII = (1 << 1),
|
||||
ASCII = (1 << 1),
|
||||
MEDIUMRAW = (1 << 2),
|
||||
UNICODE = (1 << 3),
|
||||
UNICODE = (1 << 3),
|
||||
};
|
||||
int fd;
|
||||
unsigned opt;
|
||||
|
@@ -136,7 +136,7 @@ static void do_loadfont(int fd, unsigned char *inbuf, int height, int width, int
|
||||
* Example:
|
||||
* At the font position for a capital A-ring glyph, we
|
||||
* may have:
|
||||
* 00C5,212B,FFFE,0041,030A,FFFF
|
||||
* 00C5,212B,FFFE,0041,030A,FFFF
|
||||
* Some font positions may be described by sequences only,
|
||||
* namely when there is no precomposed Unicode value for the glyph.
|
||||
*/
|
||||
@@ -159,7 +159,7 @@ static void do_loadtable(int fd, unsigned char *inbuf, int tailsz, int fontsize,
|
||||
int glyph;
|
||||
uint16_t unicode;
|
||||
|
||||
maxct = tailsz; /* more than enough */
|
||||
maxct = tailsz; /* more than enough */
|
||||
up = xmalloc(maxct * sizeof(*up));
|
||||
|
||||
for (glyph = 0; glyph < fontsize; glyph++) {
|
||||
@@ -255,10 +255,10 @@ static void do_load(int fd, unsigned char *buffer, size_t len)
|
||||
} else
|
||||
#endif
|
||||
#if ENABLE_FEATURE_LOADFONT_RAW
|
||||
if (len == 9780) { /* file with three code pages? */
|
||||
if (len == 9780) { /* file with three code pages? */
|
||||
charsize = height = 16;
|
||||
font += 40;
|
||||
} else if ((len & 0377) == 0) { /* bare font */
|
||||
} else if ((len & 0377) == 0) { /* bare font */
|
||||
charsize = height = len / 256;
|
||||
} else
|
||||
#endif
|
||||
|
@@ -16,9 +16,9 @@ struct globals {
|
||||
struct termios tio, tio0;
|
||||
};
|
||||
#define G (*ptr_to_globals)
|
||||
#define kbmode (G.kbmode)
|
||||
#define tio (G.tio)
|
||||
#define tio0 (G.tio0)
|
||||
#define kbmode (G.kbmode)
|
||||
#define tio (G.tio)
|
||||
#define tio0 (G.tio0)
|
||||
#define INIT_G() do { \
|
||||
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
|
||||
} while (0)
|
||||
@@ -46,9 +46,9 @@ int showkey_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int showkey_main(int argc UNUSED_PARAM, char **argv)
|
||||
{
|
||||
enum {
|
||||
OPT_a = (1<<0), // display the decimal/octal/hex values of the keys
|
||||
OPT_k = (1<<1), // display only the interpreted keycodes (default)
|
||||
OPT_s = (1<<2), // display only the raw scan-codes
|
||||
OPT_a = (1<<0), // display the decimal/octal/hex values of the keys
|
||||
OPT_k = (1<<1), // display only the interpreted keycodes (default)
|
||||
OPT_s = (1<<2), // display only the raw scan-codes
|
||||
};
|
||||
|
||||
INIT_G();
|
||||
|
Reference in New Issue
Block a user