summaryrefslogtreecommitdiffstatshomepage
path: root/xkbcat.c
diff options
context:
space:
mode:
authorGravatar Antti K2014-07-29 16:50:49 +0200
committerGravatar Antti K2014-07-29 20:35:36 +0200
commit4df164a1fd49dcc3d4eb243702ded1f183958464 (patch)
treec1ac1d18283b63e14723b5151dd2b47f22e434e3 /xkbcat.c
parent4d47eb99842b53d3e02d06c189d89e731f8361a3 (diff)
downloadxkbcat-4df164a1fd49dcc3d4eb243702ded1f183958464.tar.gz
xkbcat-4df164a1fd49dcc3d4eb243702ded1f183958464.zip
Use C99 booleans
No need for TRUE/FALSE macros anymore.
Diffstat (limited to 'xkbcat.c')
-rw-r--r--xkbcat.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/xkbcat.c b/xkbcat.c
index 8702e92..4d56ac7 100644
--- a/xkbcat.c
+++ b/xkbcat.c
@@ -20,10 +20,7 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
-
-const int TRUE = 1;
-const int FALSE = 0;
+#include <stdbool.h>
char *DEFAULT_DISPLAY = ":0";
const int DEFAULT_DELAY = 10000;
@@ -32,7 +29,7 @@ const int KEYSYM_STRLEN = 64;
/* Globals */
Display *disp;
-int printKeyUps = FALSE;
+int printKeyUps = false;
char *KeyCodeToStr(int code, int down);
@@ -65,7 +62,7 @@ int main(int argc, char *argv[]) {
i++;
delay = atoi(argv[i]);
}
- else if (!strcmp(argv[i], "-up")) { printKeyUps = TRUE; }
+ else if (!strcmp(argv[i], "-up")) { printKeyUps = true; }
else usage();
}
@@ -75,7 +72,7 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "Cannot open X display: %s\n", hostname);
exit(1);
}
- XSynchronize(disp, TRUE);
+ XSynchronize(disp, true);
/* setup buffers */
saved = buf1; keys=buf2;