X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=nntp%2Fnntp.c;h=6869b21a9f2539ad491040c471705aaeb1fff4bf;hp=ca3e51edc33d253555ed9a1ec556cac14b83851a;hb=d0dc8fb657cff90709c15d4b106415b868857f6a;hpb=c98480f8568e6c1bc927c6c5f2b5e80b4aa6548c diff --git a/nntp/nntp.c b/nntp/nntp.c index ca3e51e..6869b21 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -18,14 +18,14 @@ #include #include +#include + #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" @@ -311,7 +311,7 @@ static int mutt_nntp_query (NNTP_DATA * data, char *line, size_t linelen) return -1; } while (!done); - strfcpy (line, buf, linelen); + m_strcpy(line, linelen, buf); return 0; } @@ -338,7 +338,7 @@ static int mutt_nntp_fetch (NNTP_DATA * nntp_data, const char *query, char *msg, 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') @@ -366,7 +366,7 @@ static int mutt_nntp_fetch (NNTP_DATA * nntp_data, const char *query, char *msg, p++; } - strfcpy (inbuf + lenbuf, p, sizeof (buf)); + m_strcpy(inbuf + lenbuf, sizeof(buf), p); pos += chunk; if (chunk >= sizeof (buf)) { @@ -583,7 +583,7 @@ static int nntp_parse_xover (CONTEXT * ctx, char *buf, HEADER * hdr) 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 @@ -591,7 +591,7 @@ static int nntp_parse_xover (CONTEXT * ctx, char *buf, HEADER * hdr) * 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; @@ -1039,7 +1039,7 @@ int nntp_post (const char *msg) 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); @@ -1431,7 +1431,7 @@ int nntp_get_active (NNTP_SERVER * serv) 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);