diff --git a/src/bfu/style.c b/src/bfu/style.c index ccab68866..bc0434a44 100644 --- a/src/bfu/style.c +++ b/src/bfu/style.c @@ -30,11 +30,11 @@ static struct hash *bfu_colors = NULL; struct color_pair * get_bfu_color(struct terminal *term, const char *stylename) { - static enum color_mode last_color_mode; + static color_mode_T last_color_mode; struct bfu_color_entry *entry; int stylenamelen; struct hash_item *item; - enum color_mode color_mode; + color_mode_T color_mode; if (!term) return NULL; diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c index 182223ab3..8f0800d24 100644 --- a/src/document/html/renderer.c +++ b/src/document/html/renderer.c @@ -103,7 +103,7 @@ static inline void set_screen_char_color(struct screen_char *schar, color_T bgcolor, color_T fgcolor, enum color_flags color_flags, - enum color_mode color_mode) + color_mode_T color_mode) { struct color_pair colors = INIT_COLOR_PAIR(bgcolor, fgcolor); @@ -2204,7 +2204,7 @@ color_link_lines(struct html_context *html_context) { struct document *document = html_context->part->document; struct color_pair colors = INIT_COLOR_PAIR(par_elformat.color.background, 0x0); - enum color_mode color_mode = document->options.color_mode; + color_mode_T color_mode = document->options.color_mode; enum color_flags color_flags = document->options.color_flags; int y; diff --git a/src/document/options.h b/src/document/options.h index 84829a226..fd53b1bdb 100644 --- a/src/document/options.h +++ b/src/document/options.h @@ -51,7 +51,7 @@ struct document_options_image_link { }; struct document_options { - enum color_mode color_mode; + color_mode_T color_mode; /** cp is the codepage for which the document is being formatted; * typically it is the codepage of a terminal. It is set in * render_document_frames(). */ diff --git a/src/document/plain/renderer.c b/src/document/plain/renderer.c index 89086d31d..156c14101 100644 --- a/src/document/plain/renderer.c +++ b/src/document/plain/renderer.c @@ -238,7 +238,7 @@ print_document_link(struct plain_renderer *renderer, int lineno, static void decode_esc_color(char *text, int *line_pos, int width, - struct screen_char *template_, enum color_mode mode, + struct screen_char *template_, color_mode_T mode, int *was_reversed) { struct screen_char ch; diff --git a/src/terminal/color.c b/src/terminal/color.c index 7f42648c4..bca84115d 100644 --- a/src/terminal/color.c +++ b/src/terminal/color.c @@ -321,7 +321,7 @@ get_term_color256(unsigned int index) void get_screen_char_color(struct screen_char *schar, struct color_pair *pair, - enum color_flags flags, enum color_mode color_mode) + enum color_flags flags, color_mode_T color_mode) { unsigned char fg, bg; @@ -376,7 +376,7 @@ get_screen_char_color(struct screen_char *schar, struct color_pair *pair, void set_term_color(struct screen_char *schar, struct color_pair *pair, - enum color_flags flags, enum color_mode color_mode) + enum color_flags flags, color_mode_T color_mode) { const struct color_mode_info *mode; enum palette_range palette_range = PALETTE_FULL; diff --git a/src/terminal/color.h b/src/terminal/color.h index 6302130bf..c59bc12b8 100644 --- a/src/terminal/color.h +++ b/src/terminal/color.h @@ -68,6 +68,8 @@ enum color_mode { COLOR_MODES = 5, /* XXX: Keep last */ }; +typedef int color_mode_T; + void set_term_color16(struct screen_char *schar, enum color_flags flags, unsigned char fg, unsigned char bg); @@ -87,9 +89,9 @@ color_T get_term_color256(unsigned int index); #endif void get_screen_char_color(struct screen_char *schar, struct color_pair *pair, - enum color_flags flags, enum color_mode color_mode); + enum color_flags flags, color_mode_T color_mode); void set_term_color(struct screen_char *schar, struct color_pair *pair, - enum color_flags flags, enum color_mode mode); + enum color_flags flags, color_mode_T mode); #ifdef __cplusplus } diff --git a/src/terminal/screen.c b/src/terminal/screen.c index 6daccc877..e106dc6c8 100644 --- a/src/terminal/screen.c +++ b/src/terminal/screen.c @@ -230,7 +230,7 @@ struct screen_driver_opt { const struct string *underline; /** The color mode */ - enum color_mode color_mode; + color_mode_T color_mode; #if defined(CONFIG_88_COLORS) || defined(CONFIG_256_COLORS) const struct string *color256_seqs; diff --git a/src/viewer/text/link.c b/src/viewer/text/link.c index 4c5a4b9fa..5a9662eb7 100644 --- a/src/viewer/text/link.c +++ b/src/viewer/text/link.c @@ -171,7 +171,7 @@ init_link_drawing(struct document_view *doc_view, struct link *link, int invert, struct document_options *doc_opts; static struct screen_char template_; enum color_flags color_flags; - enum color_mode color_mode; + color_mode_T color_mode; struct color_pair colors; template_.attr = SCREEN_ATTR_STANDOUT;