From 3806c6b10abf130d1c06e2d0fb99e9f319986f55 Mon Sep 17 00:00:00 2001 From: Benjamin Titmus Date: Fri, 13 Nov 2020 21:24:20 +0000 Subject: Add italic option to colors --- src/color.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/color.c') diff --git a/src/color.c b/src/color.c index 91632d2..cbbd0e6 100644 --- a/src/color.c +++ b/src/color.c @@ -86,6 +86,7 @@ void start_default_ucolors() { int i; for (i=0; i < N_INIT_PAIRS; i++) { ucolors[ i ].bold = 0; + ucolors[ i ].italic = 0; ucolors[ i ].dim = 0; ucolors[ i ].reverse = 0; ucolors[ i ].standout = 0; @@ -291,6 +292,7 @@ void chg_color(char * str) { ucolors[ type ].fg = atoi(get(d_colors_param, get(d, "fg"))); ucolors[ type ].bg = atoi(get(d_colors_param, get(d, "bg"))); if (((cl = get(d, "bold")) != NULL) && cl[0] != '\0') ucolors[ type ].bold = atoi(get(d, "bold")); + if (((cl = get(d, "italic")) != NULL) && cl[0] != '\0') ucolors[ type ].italic = atoi(get(d, "italic")); if (((cl = get(d, "dim")) != NULL) && cl[0] != '\0') ucolors[ type ].dim = atoi(get(d, "dim")); if (((cl = get(d, "reverse")) != NULL) && cl[0] != '\0') ucolors[ type ].reverse = atoi(get(d, "reverse")); if (((cl = get(d, "standout")) != NULL) && cl[0] != '\0') ucolors[ type ].standout = atoi(get(d, "standout")); @@ -372,6 +374,7 @@ void color_cell(int r, int c, int rf, int cf, char * str) { n->ucolor->fg = NONE_COLOR; n->ucolor->bg = NONE_COLOR; n->ucolor->bold = 0; + n->ucolor->italic = 0; n->ucolor->dim = 0; n->ucolor->reverse = 0; n->ucolor->standout = 0; @@ -386,6 +389,7 @@ void color_cell(int r, int c, int rf, int cf, char * str) { n->ucolor->fg = atoi(get(d_colors_param, get(d, "fg"))); if ((cl = get(d, "bold")) != NULL && cl[0] != '\0') n->ucolor->bold = atoi(get(d, "bold")); + if ((cl = get(d, "italic")) != NULL && cl[0] != '\0') n->ucolor->italic = atoi(get(d, "italic")); if ((cl = get(d, "dim") ) != NULL && cl[0] != '\0') n->ucolor->dim = atoi(get(d, "dim")); if ((cl = get(d, "reverse")) != NULL && cl[0] != '\0') n->ucolor->reverse = atoi(get(d, "reverse")); if ((cl = get(d, "standout")) != NULL && cl[0] != '\0') n->ucolor->standout = atoi(get(d, "standout")); @@ -486,6 +490,7 @@ int same_ucolor(struct ucolor * u, struct ucolor * v) { if (u->fg != v->fg) return 0; if (u->bg != v->bg) return 0; if (u->bold != v->bold) return 0; + if (u->italic != v->italic) return 0; if (u->dim != v->dim) return 0; if (u->reverse != v->reverse) return 0; if (u->standout != v->standout) return 0; -- cgit v1.2.3