diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-01-05 21:59:40 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-01-05 21:59:40 +0100 |
| commit | cc776730a7ddfb535d95548df6f50387be8718ff (patch) | |
| tree | fa8a1cc621246777d20902fcae941a0e6d92c178 | |
| parent | dc29c3066584e53b45a4e23969c381e6c70cd604 (diff) | |
| download | vis-cc776730a7ddfb535d95548df6f50387be8718ff.tar.gz vis-cc776730a7ddfb535d95548df6f50387be8718ff.tar.xz | |
ui: remove now unused code
| -rw-r--r-- | ui-curses.c | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/ui-curses.c b/ui-curses.c index 52b11fc..631f816 100644 --- a/ui-curses.c +++ b/ui-curses.c @@ -1,6 +1,3 @@ -/* parts of the color handling code originates from tmux/colour.c and is - * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> - */ #include <unistd.h> #include <stdlib.h> #include <string.h> @@ -35,8 +32,6 @@ # define MAX_COLOR_PAIRS COLOR_PAIRS #endif -#define CONTROL(k) ((k)&0x1F) - #ifndef DEBUG_UI #define DEBUG_UI 0 #endif @@ -67,6 +62,10 @@ } while (0); #endif +#define MAX_COLOR_CLOBBER 240 +static short color_clobber_idx = 0; +static uint32_t clobbering_colors[MAX_COLOR_CLOBBER]; + typedef struct { attr_t attr; short fg, bg; @@ -117,38 +116,6 @@ __attribute__((noreturn)) static void ui_die_msg(Ui *ui, const char *msg, ...) { va_end(ap); } -typedef struct { - unsigned char i; - unsigned char r; - unsigned char g; - unsigned char b; -} Color; - -#define MAX_COLOR_CLOBBER (240) -static short color_clobber_idx = 0; -static uint32_t clobbering_colors[MAX_COLOR_CLOBBER]; - -static int color_compare(const void *lhs0, const void *rhs0) { - const Color *lhs = lhs0, *rhs = rhs0; - - if (lhs->r < rhs->r) - return -1; - if (lhs->r > rhs->r) - return 1; - - if (lhs->g < rhs->g) - return -1; - if (lhs->g > rhs->g) - return 1; - - if (lhs->b < rhs->b) - return -1; - if (lhs->b > rhs->b) - return 1; - - return 0; -} - /* Calculate r,g,b components of one of the standard upper 240 colors */ static void get_6cube_rgb(unsigned int n, int *r, int *g, int *b) { |
