1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[color] enum color_mode -> color_mode_T

This commit is contained in:
Witold Filipczyk 2022-01-28 14:42:48 +01:00
parent 3f29dada0a
commit d839efc9f4
8 changed files with 14 additions and 12 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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(). */

View File

@ -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;

View File

@ -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;

View File

@ -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
}

View File

@ -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;

View File

@ -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;