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;