summaryrefslogtreecommitdiff
path: root/tools/interactive-x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/interactive-x11.c')
-rw-r--r--tools/interactive-x11.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/interactive-x11.c b/tools/interactive-x11.c
index d98433e..c7ca9aa 100644
--- a/tools/interactive-x11.c
+++ b/tools/interactive-x11.c
@@ -26,6 +26,7 @@
#include <locale.h>
#include <stdbool.h>
#include <stdlib.h>
+#include <string.h>
#include <xcb/xkb.h>
@@ -336,6 +337,14 @@ main(int argc, char *argv[])
struct xkb_context *ctx;
struct keyboard core_kbd;
+ if (argc != 1) {
+ ret = strcmp(argv[1], "--help");
+ fprintf(ret ? stderr : stdout, "Usage: %s [--help]\n", argv[0]);
+ if (ret)
+ fprintf(stderr, "unrecognized option: %s\n", argv[1]);
+ return ret ? EXIT_INVALID_USAGE : EXIT_SUCCESS;
+ }
+
setlocale(LC_ALL, "");
conn = xcb_connect(NULL, NULL);