#include "keys-from-name.h"
#include "keys-to-name.h"
+#include "macro.h"
#include "util.h"
#define MAX_SCANCODES 1024
ioctl(fd, EVIOCGRAB, 0);
}
-static void help(int error)
+_noreturn_ static void help(int error)
{
const char* h = "Usage: keymap <event device> [<map file>]\n"
" keymap <event device> scancode keyname [...]\n"
int main(int argc, char **argv)
{
- enum {
- ARG_VERSION = 0x100,
- };
-
static const struct option options[] = {
{ "help", no_argument, NULL, 'h' },
- { "version", no_argument, NULL, ARG_VERSION },
{ "interactive", no_argument, NULL, 'i' },
{}
};
case 'h':
help(0);
- case ARG_VERSION:
- puts(PACKAGE_STRING);
- exit(0);
-
case 'i':
opt_interactive = 1;
break;