20 #include "lirc/input_map.h"
24 linux_input_code
code;
26 #include "lirc/input_map.inc"
32 int get_input_code(
const char* name, linux_input_code* code)
36 for (i = 0; input_map[i].name != NULL; i++) {
37 if (strcasecmp(name, input_map[i].name) == 0) {
38 *code = input_map[i].code;
45 void fprint_namespace(FILE* f)
49 for (i = 0; input_map[i].name != NULL; i++)
50 fprintf(stdout,
"%s\n", input_map[i].name);
53 int is_in_namespace(
const char* name)
55 linux_input_code dummy;
57 return get_input_code(name, &dummy) == -1 ? 0 : 1;