#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
-#include <lib-lib/debug.h>
#include <lib-sys/exit.h>
#include <lib-sys/mutt_signal.h>
if (a->type == TYPEMULTIPART) {
/* First, find the boundary to use */
if (!(p = mutt_get_parameter ("boundary", a->parameter))) {
- debug_print (1, ("no boundary parameter found!\n"));
mutt_error _("No boundary parameter found! [report this error]");
return (-1);
}
if ((fpin = fopen (a->filename, "r")) == NULL) {
- debug_print (1, ("%s no longer exists!\n", a->filename));
mutt_error (_("%s no longer exists!"), a->filename);
return -1;
}
ib = bufi;
ob = bufu, obl = sizeof (bufu);
n = my_iconv(cd1, ibl ? &ib : 0, &ibl, &ob, &obl);
- assert (n == -1 || !n || ICONV_NONTRANS);
+ assert (n == -1 || !n);
if (n == -1 &&
((errno != EINVAL && errno != E2BIG) || ib == bufi)) {
assert (errno == EILSEQ ||
}
if ((fp = fopen (fname, "r")) == NULL) {
- debug_print (1, ("%s: %s (errno %d).\n", fname, strerror (errno), errno));
return (NULL);
}
convert_file_from_to (fp, fchs, chs ? chs : SendCharset,
&fromcode, &tocode, info) != -1) {
if (!chs) {
- mutt_canonical_charset (chsbuf, sizeof (chsbuf), tocode);
+ charset_canonicalize (chsbuf, sizeof (chsbuf), tocode);
mutt_set_parameter ("charset", chsbuf, &b->parameter);
}
b->file_charset = fromcode;
if (b != NULL && b->type == TYPETEXT && (!b->noconv && !b->force_charset))
mutt_set_parameter ("charset", (!info->hibin ? "us-ascii" :
Charset
- && !mutt_is_us_ascii (Charset) ? Charset :
+ && !charset_is_us_ascii (Charset) ? Charset :
"unknown-8bit"), &b->parameter);
return info;
m_strcpy(buf, sizeof(buf), SYSCONFDIR "/mime.types");
break;
default:
- debug_print (1, ("Internal error, count = %d.\n", count));
goto bye; /* shouldn't happen */
}
p = mutt_get_parameter ("charset", b->parameter);
if (p)
- mutt_canonical_charset (d, dlen, NONULL (p));
+ charset_canonicalize (d, dlen, NONULL (p));
else
m_strcpy(d, dlen, "us-ascii");
char chsbuff[STRING];
/* override noconv when it's us-ascii */
- if (mutt_is_us_ascii (mutt_get_body_charset (chsbuff, sizeof (chsbuff), a)))
+ if (charset_is_us_ascii (mutt_get_body_charset (chsbuff, sizeof (chsbuff), a)))
a->noconv = 0;
if (!a->force_charset && !a->noconv)
}
if (dup) {
- debug_print (2, ("Removing %s\n", addr->mailbox));
-
*last = addr->next;
addr->next = NULL;
set_noconv_flags (hdr->content, 1);
if (mx_open_mailbox (path, M_APPEND | M_QUIET, &f) == NULL) {
- debug_print (1, ("unable to open mailbox %s in append-mode, aborting.\n", path));
return (-1);
}
fflush (tempfp);
if (ferror (tempfp)) {
- debug_print (1, ("%s: write failed.\n", tempfile));
fclose (tempfp);
unlink (tempfile);
mx_commit_message (msg, &f); /* XXX - really? */