summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Antti K2014-07-26 14:31:27 +0200
committerGravatar Antti K2014-07-26 14:31:27 +0200
commit7bf7b120fc6c34164dfdf07938d7de58fd7f7413 (patch)
tree496d64146cbe33b0d927eeeaa9e7f0257a222bd7
parent4786ebba9583eda0bda7695387f71909d08c8d03 (diff)
downloadxkbcat-7bf7b120fc6c34164dfdf07938d7de58fd7f7413.tar.gz
xkbcat-7bf7b120fc6c34164dfdf07938d7de58fd7f7413.zip
Clean up
Stop compiler complaining about implicit usleep with explicit include. Neater variable declaration-initialisation on one line.
-rw-r--r--xspy.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xspy.c b/xspy.c
index baaddd1..5025a70 100644
--- a/xspy.c
+++ b/xspy.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#define VERSION "1.0c"
#define DEFAULT_DISPLAY ":0"
@@ -118,9 +119,7 @@ int main(int argc, char *argv[]) {
char *KeyCodeToStr(int code, int down) {
static char *str, buf[KEYSYM_STRLEN+1];
- KeySym keysym;
-
- keysym=XKeycodeToKeysym(disp, code, 0);
+ KeySym keysym = XKeycodeToKeysym(disp, code, 0);
if (NoSymbol==keysym) return "";
/* convert keysym to a string, copy it to a local area */