X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=color.c;h=6266e67e728f130b5fbe6e8dcc1cdf4aced02ed4;hp=87c7ded5e20e34f198b98ffc6050811f41ddb987;hb=8376ae73a59f4a6075ab91bf99fe97b394a58d79;hpb=74a2265af51ce89bca845adc1d68f273c9933c13 diff --git a/color.c b/color.c index 87c7ded..6266e67 100644 --- a/color.c +++ b/color.c @@ -18,6 +18,7 @@ #include "lib/mem.h" #include "lib/intl.h" #include "lib/str.h" +#include "lib/debug.h" #include #include @@ -245,8 +246,7 @@ int mutt_alloc_color (int fg, int bg) init_pair (i, fg, bg); - dprint (1, (debugfile, "mutt_alloc_color(): Color pairs used so far: %d\n", - UserColors)); + debug_print (1, ("Color pairs used so far: %d\n", UserColors)); return (COLOR_PAIR (p->index)); } @@ -263,9 +263,7 @@ void mutt_free_color (int fg, int bg) return; UserColors--; - dprint (1, - (debugfile, "mutt_free_color(): Color pairs used so far: %d\n", - UserColors)); + debug_print (1, ("Color pairs used so far: %d\n", UserColors)); if (p == ColorList) { ColorList = ColorList->next; @@ -297,13 +295,13 @@ parse_color_name (const char *s, int *col, int *attr, int brite, BUFFER * err) { char *eptr; - if (mutt_strncasecmp (s, "bright", 6) == 0) { + if (safe_strncasecmp (s, "bright", 6) == 0) { *attr |= brite; s += 6; } /* allow aliases for xterm color resources */ - if (mutt_strncasecmp (s, "color", 5) == 0) { + if (safe_strncasecmp (s, "color", 5) == 0) { s += 5; *col = strtol (s, &eptr, 10); if (!*s || *eptr || *col < 0 || @@ -363,7 +361,7 @@ _mutt_parse_uncolor (BUFFER * buf, BUFFER * s, unsigned long data, return (-1); } - if (mutt_strncmp (buf->data, "index", 5) != 0) { + if (safe_strncmp (buf->data, "index", 5) != 0) { snprintf (err->data, err->dsize, _("%s: command valid only for index object"), parse_uncolor ? "uncolor" : "unmono"); @@ -417,9 +415,7 @@ _mutt_parse_uncolor (BUFFER * buf, BUFFER * s, unsigned long data, if (!mutt_strcmp (buf->data, tmp->pattern)) { if (!do_cache) do_cache = 1; - dprint (1, - (debugfile, "Freeing pattern \"%s\" from ColorIndexList\n", - tmp->pattern)); + debug_print (1, ("Freeing pattern \"%s\" from ColorIndexList\n", tmp->pattern)); if (last) last->next = tmp->next; else @@ -462,7 +458,7 @@ add_pattern (COLOR_LINE ** top, const char *s, int sensitive, break; } else { - if (mutt_strcasecmp (s, tmp->pattern) == 0) + if (safe_strcasecmp (s, tmp->pattern) == 0) break; } tmp = tmp->next; @@ -538,7 +534,7 @@ parse_object (BUFFER * buf, BUFFER * s, int *o, int *ql, BUFFER * err) } mutt_extract_token (buf, s, 0); - if (!mutt_strncmp (buf->data, "quoted", 6)) { + if (!safe_strncmp (buf->data, "quoted", 6)) { if (buf->data[6]) { *ql = strtol (buf->data + 6, &eptr, 10); if (*eptr || q_level < 0) {