X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fcolor.c;h=9a1a65d317c2377d5526b64262073803db5325fc;hb=142d30ec0fa23abf29a327968f7cfeb1cd27bb3f;hp=c5037245c23cd21282ed681595d6188abcbbb9d2;hpb=84bc6d1930165b21919541b3b24294a9d99c3541;p=apps%2Fmadmutt.git diff --git a/lib-ui/color.c b/lib-ui/color.c index c503724..9a1a65d 100644 --- a/lib-ui/color.c +++ b/lib-ui/color.c @@ -7,10 +7,7 @@ * please see the file GPL in the top level source directory. */ -#include - -#include "curses.h" - +#include #include "pattern.h" #include "mutt.h" @@ -47,9 +44,7 @@ static struct mapping_t Colors[] = { {"red", COLOR_RED}, {"white", COLOR_WHITE}, {"yellow", COLOR_YELLOW}, -#if defined (HAVE_USE_DEFAULT_COLORS) {"default", COLOR_DEFAULT}, -#endif {0, 0} }; @@ -170,12 +165,10 @@ int mutt_alloc_color (int fg, int bg) p->bg = bg; p->fg = fg; -#if defined (HAVE_USE_DEFAULT_COLORS) if (fg == COLOR_DEFAULT) fg = -1; if (bg == COLOR_DEFAULT) bg = -1; -#endif init_pair (i, fg, bg); @@ -567,7 +560,6 @@ _mutt_parse_color (BUFFER * buf, BUFFER * s, BUFFER * err, return 0; -#ifdef HAVE_USE_DEFAULT_COLORS if (!option (OPTNOCURSES) && has_colors () /* delay use_default_colors() until needed, since it initializes things */ && (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT) @@ -575,7 +567,6 @@ _mutt_parse_color (BUFFER * buf, BUFFER * s, BUFFER * err, m_strcpy(err->data, err->dsize, _("default colors not supported")); return (-1); } -#endif /* HAVE_USE_DEFAULT_COLORS */ if (object == MT_COLOR_HEADER) r = add_pattern (&ColorHdrList, buf->data, 0, fg, bg, attr, err, 0); @@ -608,10 +599,8 @@ _mutt_parse_color (BUFFER * buf, BUFFER * s, BUFFER * err, else ColorDefs[object] = fgbgattr_to_color (fg, bg, attr); -#ifdef HAVE_BKGDSET if (object == MT_COLOR_NORMAL && !option (OPTNOCURSES) && has_colors ()) - BKGDSET (MT_COLOR_NORMAL); -#endif + BKGDSET(main_w, MT_COLOR_NORMAL); return (r); }