X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=color.c;h=82180f7b91a5f341a1310a16419f8be71800518d;hb=9aae63e2d1cce39bb0928362416a8d17b953ca5e;hp=1c60c7766cfadbf7ab9eeaecea2f3e25a70b4e92;hpb=617e7d83d14e14e6a520a48e75437211b16c8834;p=apps%2Fmadmutt.git diff --git a/color.c b/color.c index 1c60c77..82180f7 100644 --- a/color.c +++ b/color.c @@ -12,15 +12,15 @@ #endif #include +#include +#include +#include #include "mutt.h" #include "buffer.h" -#include "ascii.h" #include "mutt_curses.h" #include "mapping.h" -#include "lib/intl.h" -#include "lib/str.h" #include "lib/debug.h" #include @@ -132,23 +132,23 @@ static void mutt_free_color_line (COLOR_LINE ** l, int free_colors) void ci_start_color (void) { - memset (ColorDefs, A_NORMAL, sizeof (int) * MT_COLOR_MAX); - ColorQuote = p_new(int, COLOR_QUOTE_INIT); - memset (ColorQuote, A_NORMAL, sizeof (int) * COLOR_QUOTE_INIT); - ColorQuoteSize = COLOR_QUOTE_INIT; - ColorQuoteUsed = 0; - - /* set some defaults */ - ColorDefs[MT_COLOR_STATUS] = A_REVERSE; - ColorDefs[MT_COLOR_INDICATOR] = A_REVERSE; - ColorDefs[MT_COLOR_SEARCH] = A_REVERSE; - ColorDefs[MT_COLOR_MARKERS] = A_REVERSE; - /* special meaning: toggle the relevant attribute */ - ColorDefs[MT_COLOR_BOLD] = 0; - ColorDefs[MT_COLOR_UNDERLINE] = 0; + memset(ColorDefs, A_NORMAL, sizeof(int) * MT_COLOR_MAX); + ColorQuote = p_new(int, COLOR_QUOTE_INIT); + memset(ColorQuote, A_NORMAL, sizeof(int) * COLOR_QUOTE_INIT); + ColorQuoteSize = COLOR_QUOTE_INIT; + ColorQuoteUsed = 0; + + /* set some defaults */ + ColorDefs[MT_COLOR_STATUS] = A_REVERSE; + ColorDefs[MT_COLOR_INDICATOR] = A_REVERSE; + ColorDefs[MT_COLOR_SEARCH] = A_REVERSE; + ColorDefs[MT_COLOR_MARKERS] = A_REVERSE; + /* special meaning: toggle the relevant attribute */ + ColorDefs[MT_COLOR_BOLD] = 0; + ColorDefs[MT_COLOR_UNDERLINE] = 0; #ifdef HAVE_COLOR - start_color (); + start_color (); #endif } @@ -510,7 +510,7 @@ add_pattern (COLOR_LINE ** top, const char *s, int sensitive, return (-1); } tmp->next = *top; - tmp->pattern = str_dup (s); + tmp->pattern = m_strdup(s); #ifdef HAVE_COLOR if (fg != -1 && bg != -1) { tmp->fg = fg;