static Mode mode;
static int grab;
-static void pr_hexdec(unsigned long value) { printf("%#lx %ld",value,value); }
+static void pr_hex(unsigned long value) { printf("%#lx",value); }
#define PR_TABLE_STR(tab, val) (pr_table_str(iesis_##tab, iesin_##tab, (val)))
static void pr_table_str(const InputEventStringInfo *strings, int nstrings,
unsigned long value) {
const InputEventStringInfo *string;
- if (value > nstrings) { pr_hexdec(value); return; }
+ if (value > nstrings) { pr_hex(value); return; }
string= &strings[value];
- if (!string->prefix) { pr_hexdec(value); return; }
- printf("%s %s", string->prefix, string->main);
+ if (!string->prefix) { pr_hex(value); return; }
+ printf("%s_%s", string->prefix, string->main);
}
static void pr_time(struct timeval tv) {
if (!t->strings) t= 0;
}
if (t) pr_table_str(t->strings, t->nstrings, ie->code);
- else pr_hexdec(ie->code);
+ else pr_hex(ie->code);
printf(" ");
switch (ie->type) {