#include <lib-lib/file.h>
#include <lib-mime/mime.h>
+#include <lib-mime/rfc3676.h>
#include <lib-ui/curses.h>
#include "mutt.h"
#include "recvattach.h"
#include "handler.h"
-#include "rfc1524.h"
-#include "rfc3676.h"
#include "keymap.h"
#include "copy.h"
#include "charset.h"
else
bufi[l++] = ch;
- if (l + 8 >= sizeof (bufi))
+ if (l + 8 >= ssizeof (bufi))
mutt_convert_to_state (cd, bufi, &l, s);
}
while (b) {
snprintf (buf, sizeof (buf), "%s/%s", TYPE (b), b->subtype);
if (mutt_is_autoview (b, buf)) {
- rfc1524_entry *entry = rfc1524_new_entry ();
+ rfc1524_entry *entry = rfc1524_entry_new();
if (rfc1524_mailcap_lookup (b, buf, entry, M_AUTOVIEW)) {
choice = b;
}
- rfc1524_free_entry (&entry);
+ rfc1524_entry_delete(&entry);
}
b = b->next;
}
static int autoview_handler (BODY * a, STATE * s)
{
- rfc1524_entry *entry = rfc1524_new_entry ();
+ rfc1524_entry *entry = rfc1524_entry_new();
char buffer[LONG_STRING];
char type[STRING];
char command[LONG_STRING];
if ((fpin = safe_fopen (tempfile, "w+")) == NULL) {
mutt_perror ("fopen");
- rfc1524_free_entry (&entry);
+ rfc1524_entry_delete(&entry);
return (-1);
}
if (s->flags & M_DISPLAY)
mutt_clear_error ();
}
- rfc1524_free_entry (&entry);
+ rfc1524_entry_delete(&entry);
return (rc);
}
void mutt_decode_attachment (BODY * b, STATE * s)
{
int istext = mutt_is_text_part (b);
- iconv_t cd = (iconv_t) (-1);
+ iconv_t cd = MUTT_ICONV_ERROR;
Quotebuf[0] = '\0';
const char *charset = mutt_get_parameter ("charset", b->parameter);
if (!option (OPTSTRICTMIME) && !charset)
- charset = mutt_get_first_charset (AssumedCharset);
+ charset = charset_getfirst(AssumedCharset);
if (charset && Charset)
cd = mutt_iconv_open (Charset, charset, M_ICONV_HOOK_FROM);
}
break;
}
- if (cd != (iconv_t) (-1))
+ if (cd != MUTT_ICONV_ERROR)
iconv_close (cd);
}
snprintf (type, sizeof (type), "%s/%s", TYPE (b), b->subtype);
if (mutt_is_autoview (b, type)) {
- rfc1524_entry *entry = rfc1524_new_entry ();
+ rfc1524_entry *entry = rfc1524_entry_new();
if (rfc1524_mailcap_lookup (b, type, entry, M_AUTOVIEW)) {
handler = autoview_handler;
s->flags &= ~M_CHARCONV;
}
- rfc1524_free_entry (&entry);
+ rfc1524_entry_delete(&entry);
}
else if (b->type == TYPETEXT) {
if (ascii_strcasecmp ("plain", b->subtype) == 0) {