#include <lib-lib/mem.h>
#include <lib-lib/str.h>
+#include <lib-lib/file.h>
#include <lib-lib/macros.h>
#include "mutt.h"
mutt_socket_close (serv->conn);
- FOREVER {
+ for (;;) {
if (nntp_connect_and_auth (serv) == 0)
return 0;
line = 0;
inbuf = p_new(char, sizeof(buf));
- FOREVER {
+ for (;;) {
chunk = mutt_socket_readln_d (buf, sizeof (buf), nntp_data->nserv->conn,
M_SOCK_LOG_HDR);
if (chunk < 0)
*colon = '\0';
colon++;
nntp_get_status (ctx, h, b, atoi (colon));
- if (h && h->article_num == 0 && str_cmp (group, b) == 0)
+ if (h && h->article_num == 0 && m_strcmp(group, b) == 0)
h->article_num = atoi (colon);
}
}
d++;
debug_print (2, ("group: %s, desc: %s\n", line, d));
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, line)) != NULL &&
- str_cmp (d, data->desc)) {
+ m_strcmp(d, data->desc)) {
p_delete(&data->desc);
data->desc = m_strdup(d);
}
unsigned int first;
ACCOUNT acct;
- memset (&acct, 0, sizeof (ACCOUNT));
+ p_clear(&acct, 1);
if (nntp_parse_url (ctx->path, &acct, buf, sizeof (buf)) < 0 || !*buf) {
mutt_error (_("%s is an invalid newsgroup specification!"), ctx->path);