mutt_message (_("Connected to %s. Posting NOT ok."), conn->account.host);
else {
mutt_socket_close (conn);
- mutt_remove_trailing_ws (buf);
+ str_skip_trailws (buf);
mutt_error ("%s", buf);
sleep (2);
return -1;
strfcpy (inbuf + lenbuf, p, sizeof (buf));
if (chunk >= sizeof (buf)) {
- lenbuf += safe_strlen (p);
+ lenbuf += mutt_strlen (p);
}
else {
line++;
*colon = '\0';
colon++;
nntp_get_status (ctx, h, p, atoi (colon));
- if (h && h->article_num == 0 && safe_strcmp (group, b) == 0)
+ if (h && h->article_num == 0 && mutt_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 &&
- safe_strcmp (d, data->desc)) {
+ mutt_strcmp (d, data->desc)) {
FREE (&data->desc);
data->desc = safe_strdup (d);
}
/* create NNTP-specific state struct if nof found in list */
if ((nntp_data = (NNTP_DATA *) hash_find (serv->newsgroups, buf)) == NULL) {
- nntp_data = safe_calloc (1, sizeof (NNTP_DATA) + safe_strlen (buf) + 1);
+ nntp_data = safe_calloc (1, sizeof (NNTP_DATA) + mutt_strlen (buf) + 1);
nntp_data->group = (char *) nntp_data + sizeof (NNTP_DATA);
strcpy (nntp_data->group, buf);
hash_insert (serv->newsgroups, nntp_data->group, nntp_data, 0);
buf[0] = '.';
buf[1] = '\0';
while (fgets (buf + 1, sizeof (buf) - 2, f) != NULL) {
- len = safe_strlen (buf);
+ len = mutt_strlen (buf);
if (buf[len - 1] == '\n') {
buf[len - 1] = '\r';
buf[len] = '\n';
}
fclose (f);
- if (buf[safe_strlen (buf) - 1] != '\n')
+ if (buf[mutt_strlen (buf) - 1] != '\n')
mutt_socket_write_d (nntp_data->nserv->conn, "\r\n", M_SOCK_LOG_HDR);
mutt_socket_write_d (nntp_data->nserv->conn, ".\r\n", M_SOCK_LOG_HDR);
if (mutt_socket_readln (buf, sizeof (buf), nntp_data->nserv->conn) < 0) {
return 0;
}
-int nntp_check_mailbox (CONTEXT * ctx)
+int nntp_check_mailbox (CONTEXT * ctx, int* unused1, int unused2)
{
return _nntp_check_mailbox (ctx, (NNTP_DATA *) ctx->data);
}
return 0;
if ((nntp_data = (NNTP_DATA *) hash_find (s->newsgroups, group)) == NULL) {
n++;
- nntp_data = safe_calloc (1, sizeof (NNTP_DATA) + safe_strlen (group) + 1);
+ nntp_data = safe_calloc (1, sizeof (NNTP_DATA) + mutt_strlen (group) + 1);
nntp_data->group = (char *) nntp_data + sizeof (NNTP_DATA);
strcpy (nntp_data->group, group);
nntp_data->nserv = s;