/*
+ * Copyright notice from original mutt:
* Copyright (C) 1998 Brandon Long <blong@fiction.net>
* Copyright (C) 1999 Andrej Gritsenko <andrej@lucky.net>
* Copyright (C) 2000-2001 Vsevolod Volkov <vvv@mutt.org.ua>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
*/
#ifdef HAVE_CONFIG_H
strfcpy (group, line, len);
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, group)) == NULL) {
data =
- (NNTP_DATA *) safe_calloc (1, sizeof (NNTP_DATA) + strlen (group) + 1);
+ (NNTP_DATA *) safe_calloc (1, sizeof (NNTP_DATA) + mutt_strlen (group) + 1);
data->group = (char *) data + sizeof (NNTP_DATA);
strcpy (data->group, group);
data->nserv = news;
return 0;
rewind (index);
while (fgets (buf, sizeof (buf), index)) {
- buf[strlen (buf) - 1] = 0; /* strip ending '\n' */
+ buf[mutt_strlen (buf) - 1] = 0; /* strip ending '\n' */
if (!mutt_strncmp (buf, "#: ", 3) &&
!mutt_strcasecmp (buf + 3, news->conn->account.host))
break;
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, buf)) == NULL) {
data =
(NNTP_DATA *) safe_calloc (1,
- sizeof (NNTP_DATA) + strlen (buf) + 1);
+ sizeof (NNTP_DATA) + mutt_strlen (buf) + 1);
data->group = (char *) data + sizeof (NNTP_DATA);
strcpy (data->group, buf);
data->nserv = news;
return NULL;
}
- buf = p = safe_calloc (strlen (server) + 10, sizeof (char));
+ buf = p = safe_calloc (mutt_strlen (server) + 10, sizeof (char));
if (url_check_scheme (server) == U_UNKNOWN) {
strcpy (buf, "nntp://");
p = strchr (buf, '\0');
line = *buf + (*pline - line);
}
strcpy (line, data->group);
- len -= strlen (line) + 1;
- line += strlen (line);
+ len -= mutt_strlen (line) + 1;
+ line += mutt_strlen (line);
*line++ = data->subscribed ? ':' : '!';
*line++ = ' ';
*line = '\0';
continue;
nntp_create_newsrc_line (data, &buf, &line, &llen);
dprint (2, (debugfile, "Added to newsrc: %s", line));
- line += strlen (line);
+ line += mutt_strlen (line);
}
/* newrc being fully rewritten */
if (news->newsrc &&
return fp;
nntp_cache_expand (buf, "cache-XXXXXX");
- pc = buf + strlen (buf) - 12; /* positioning to "cache-XXXXXX" */
+ pc = buf + mutt_strlen (buf) - 12; /* positioning to "cache-XXXXXX" */
if ((fd = mkstemp (buf)) == -1)
return NULL;
strcpy (s, pc); /* generated name */
return NULL;
if (!(data = (NNTP_DATA *) hash_find (news->newsgroups, group))) {
data =
- (NNTP_DATA *) safe_calloc (1, sizeof (NNTP_DATA) + strlen (group) + 1);
+ (NNTP_DATA *) safe_calloc (1, sizeof (NNTP_DATA) + mutt_strlen (group) + 1);
data->group = (char *) data + sizeof (NNTP_DATA);
strcpy (data->group, group);
data->nserv = news;