/*
+ * Copyright notice from original mutt:
* Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
*/
#if HAVE_CONFIG_H
#include "mutt_curses.h"
#include "mapping.h"
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+#include "lib/debug.h"
+
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
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));
}
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;
{
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 ||
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");
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
break;
}
else {
- if (mutt_strcasecmp (s, tmp->pattern) == 0)
+ if (safe_strcasecmp (s, tmp->pattern) == 0)
break;
}
tmp = tmp->next;
}
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) {