defines united

xkbcommon
Alessandro Mauri 5 years ago
parent 2a236af8a1
commit db923d7ae0
  1. 31
      hkd.c

31
hkd.c

@ -1,35 +1,16 @@
/* Standard stuff */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
/* Standard errors */
#include <errno.h> #include <errno.h>
/* Directory and file control */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <dirent.h> #include <dirent.h>
#include <unistd.h> #include <unistd.h>
/* Polling */
#include <poll.h> #include <poll.h>
/* Signaling */
#include <signal.h> #include <signal.h>
/* Process wait */
#include <sys/wait.h> #include <sys/wait.h>
#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<<yalv%8)) > 0)
/* Determine dependencies based on platform */
#ifdef __linux__ #ifdef __linux__
#define OS linux #define OS linux
#include <linux/input.h> #include <linux/input.h>
@ -43,6 +24,18 @@
#define OS unix #define OS unix
#endif #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<<yalv%8)) > 0)
struct key_buffer { struct key_buffer {
unsigned short *buf; unsigned short *buf;
unsigned int size; unsigned int size;

Loading…
Cancel
Save