xkbcommon
Alessandro Mauri 5 years ago
parent c4e671b203
commit d7b0ac68ef
  1. 3
      hkd.c

@ -22,6 +22,7 @@
#define ANSI_COLOR_RESET "\x1b[0m" #define ANSI_COLOR_RESET "\x1b[0m"
#define yellow(str) (ANSI_COLOR_YELLOW str ANSI_COLOR_RESET) #define yellow(str) (ANSI_COLOR_YELLOW str ANSI_COLOR_RESET)
#define green(str) (ANSI_COLOR_GREEN str ANSI_COLOR_RESET)
#define red(str) (ANSI_COLOR_RED 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) #define test_bit(yalv, abs_b) ((((char *)abs_b)[yalv/8] & (1<<yalv%8)) > 0)
#define die(str) {perror(red(str)); exit(errno);} #define die(str) {perror(red(str)); exit(errno);}
@ -288,7 +289,7 @@ void update_descriptors_list (int **fds, int *fd_num)
} }
closedir(ev_dir); closedir(ev_dir);
if (*fd_num) { if (*fd_num) {
fprintf(stderr, yellow("Monitoring %d devices\n"), *fd_num); fprintf(stderr, green("Monitoring %d devices\n"), *fd_num);
} else { } else {
fprintf(stderr, red("Could not open any devices, exiting\n")); fprintf(stderr, red("Could not open any devices, exiting\n"));
exit(-1); exit(-1);

Loading…
Cancel
Save