#include <lib-lib/file.h>
#include <lib-lib/macros.h>
+#include <lib-mime/mime.h>
+
#include "mutt.h"
#include "mutt_curses.h"
#include "sort.h"
#include "mx.h"
#include "mx_nntp.h"
-#include "mime.h"
#include "rfc1524.h"
-#include "rfc2047.h"
#include "nntp.h"
#include "sidebar.h"
#include "buffy.h"
return -1;
} while (!done);
- strfcpy (line, buf, linelen);
+ m_strcpy(line, linelen, buf);
return 0;
}
int ret;
do {
- strfcpy (buf, query, sizeof (buf));
+ m_strcpy(buf, sizeof(buf), query);
if (mutt_nntp_query (nntp_data, buf, sizeof (buf)) < 0)
return -1;
if (buf[0] == '5')
p++;
}
- strfcpy (inbuf + lenbuf, p, sizeof (buf));
+ m_strcpy(inbuf + lenbuf, sizeof(buf), p);
pos += chunk;
if (chunk >= sizeof (buf)) {
hdr->env->subject = m_strdup(b);
break;
case 2:
- rfc822_free_address (&hdr->env->from);
+ address_delete (&hdr->env->from);
hdr->env->from = rfc822_parse_adrlist (hdr->env->from, b);
/* same as for mutt_parse_rfc822_line():
* don't leave from info NULL if there's an invalid address (or
* and mark mail/(esp.) news article as your own. aaargh! this
* bothered me for _years_ */
if (!hdr->env->from) {
- hdr->env->from = rfc822_new_address ();
+ hdr->env->from = address_new ();
hdr->env->from->personal = m_strdup(b);
}
break;
hdr->env->xref = m_strdup(b);
nntp_parse_xref (ctx, nntp_data->group, b, hdr);
}
- rfc2047_decode_envelope (hdr->env);
+ rfc2047_decode_envelope(hdr->env);
if (!*p)
return -1;
b = p;
return -1;
}
- strfcpy (buf, "POST\r\n", sizeof (buf));
+ m_strcpy(buf, sizeof(buf), "POST\r\n");
if (mutt_nntp_query (nntp_data, buf, sizeof (buf)) < 0) {
mutt_error (_("Can't post article. Connection to %s lost."),
nntp_data->nserv->conn->account.host);
return -1;
}
- strfcpy (msg, _("Loading descriptions..."), sizeof (msg));
+ m_strcpy(msg, sizeof(msg), _("Loading descriptions..."));
mutt_message (msg);
nntp_get_desc (&nntp_data, "*", msg, NULL);