diff options
| author | 2014-07-29 16:50:49 +0200 | |
|---|---|---|
| committer | 2014-07-29 20:35:36 +0200 | |
| commit | 4df164a1fd49dcc3d4eb243702ded1f183958464 (patch) | |
| tree | c1ac1d18283b63e14723b5151dd2b47f22e434e3 | |
| parent | 4d47eb99842b53d3e02d06c189d89e731f8361a3 (diff) | |
| download | xkbcat-4df164a1fd49dcc3d4eb243702ded1f183958464.tar.gz xkbcat-4df164a1fd49dcc3d4eb243702ded1f183958464.zip | |
Use C99 booleans
No need for TRUE/FALSE macros anymore.
| -rw-r--r-- | xkbcat.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -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; |
