From db923d7ae02593ba24d7b194b4b1efa7cbb6df21 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Tue, 12 May 2020 12:17:24 +0200 Subject: [PATCH] defines united --- hkd.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/hkd.c b/hkd.c index 776ca6d..ec9a82e 100644 --- a/hkd.c +++ b/hkd.c @@ -1,35 +1,16 @@ -/* Standard stuff */ #include #include #include -/* Standard errors */ #include -/* Directory and file control */ #include #include #include #include #include -/* Polling */ #include -/* Signaling */ #include -/* Process wait */ #include -#define ANSI_COLOR_RED "\x1b[31m" -#define ANSI_COLOR_GREEN "\x1b[32m" -#define ANSI_COLOR_YELLOW "\x1b[33m" -#define ANSI_COLOR_BLUE "\x1b[34m" -#define ANSI_COLOR_MAGENTA "\x1b[35m" -#define ANSI_COLOR_CYAN "\x1b[36m" -#define ANSI_COLOR_RESET "\x1b[0m" - -#define yellow(str) (ANSI_COLOR_YELLOW str ANSI_COLOR_RESET) -#define red(str) (ANSI_COLOR_RED str ANSI_COLOR_RESET) -#define test_bit(yalv, abs_b) ((((char *)abs_b)[yalv/8] & (1< 0) - -/* Determine dependencies based on platform */ #ifdef __linux__ #define OS linux #include @@ -43,6 +24,18 @@ #define OS unix #endif +#define ANSI_COLOR_RED "\x1b[31m" +#define ANSI_COLOR_GREEN "\x1b[32m" +#define ANSI_COLOR_YELLOW "\x1b[33m" +#define ANSI_COLOR_BLUE "\x1b[34m" +#define ANSI_COLOR_MAGENTA "\x1b[35m" +#define ANSI_COLOR_CYAN "\x1b[36m" +#define ANSI_COLOR_RESET "\x1b[0m" + +#define yellow(str) (ANSI_COLOR_YELLOW str ANSI_COLOR_RESET) +#define red(str) (ANSI_COLOR_RED str ANSI_COLOR_RESET) +#define test_bit(yalv, abs_b) ((((char *)abs_b)[yalv/8] & (1< 0) + struct key_buffer { unsigned short *buf; unsigned int size;