/*
+ * Copyright notice from original mutt:
* Copyright (C) 1996-2000 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 "mapping.h"
#include "sort.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>
mutt_expand_file_fmt (cmd, sizeof (cmd), QueryCmd, s);
if ((thepid = mutt_create_filter (cmd, NULL, &fp, NULL)) < 0) {
- dprint (1, (debugfile, "unable to fork command: %s", cmd));
+ debug_print (1, ("unable to fork command: %s\n", cmd));
return 0;
}
if (!quiet)
FREE (&buf);
fclose (fp);
if (mutt_wait_filter (thepid)) {
- dprint (1, (debugfile, "Error: %s\n", msg));
+ debug_print (1, ("Error: %s\n", msg));
if (!quiet)
mutt_error ("%s", msg);
}
mutt_format_string (buf2, sizeof (buf2),
FirstColumn + 2, FirstColumn + 2,
0, ' ', table[num].data->name,
- mutt_strlen (table[num].data->name), 0);
+ safe_strlen (table[num].data->name), 0);
snprintf (s, slen, " %c %3d %s %-*.*s %s",
table[num].tagged ? '*' : ' ',
mutt_addrlist_to_local (tmpa);
tagged = 1;
rfc822_write_address (buf, buflen, tmpa, 0);
- curpos = mutt_strlen (buf);
+ curpos = safe_strlen (buf);
rfc822_free_address (&tmpa);
}
else if (curpos + 2 < buflen) {
strcat (buf, ", "); /* __STRCAT_CHECKED__ */
rfc822_write_address ((char *) buf + curpos + 1,
buflen - curpos - 1, tmpa, 0);
- curpos = mutt_strlen (buf);
+ curpos = safe_strlen (buf);
rfc822_free_address (&tmpa);
}
}