len = sizeof (group);
strfcpy (group, line, len);
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, group)) == NULL) {
len = sizeof (group);
strfcpy (group, line, len);
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, group)) == NULL) {
data->group = (char *) data + sizeof (NNTP_DATA);
strcpy (data->group, group);
data->nserv = news;
data->group = (char *) data + sizeof (NNTP_DATA);
strcpy (data->group, group);
data->nserv = news;
while (fgets (buf, sb.st_size + 1, fp))
nntp_parse_newsrc_line (news, buf);
while (fgets (buf, sb.st_size + 1, fp))
nntp_parse_newsrc_line (news, buf);
snprintf (buf, sizeof (buf), "%s/.index", dir);
if (!(index = safe_fopen (buf, "a+")))
return 0;
rewind (index);
while (fgets (buf, sizeof (buf), index)) {
snprintf (buf, sizeof (buf), "%s/.index", dir);
if (!(index = safe_fopen (buf, "a+")))
return 0;
rewind (index);
while (fgets (buf, sizeof (buf), index)) {
if (!str_ncmp (buf, "#: ", 3) &&
!str_casecmp (buf + 3, news->conn->account.host))
break;
if (!str_ncmp (buf, "#: ", 3) &&
!str_casecmp (buf + 3, news->conn->account.host))
break;
break;
sscanf (cp + 1, "%s %d %d", file, &l, &m);
if (!str_cmp (buf, "ALL")) {
break;
sscanf (cp + 1, "%s %d %d", file, &l, &m);
if (!str_cmp (buf, "ALL")) {
news->newgroups_time = m;
}
else if (news->newsgroups) {
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, buf)) == NULL) {
news->newgroups_time = m;
}
else if (news->newsgroups) {
if ((data = (NNTP_DATA *) hash_find (news->newsgroups, buf)) == NULL) {
data->group = (char *) data + sizeof (NNTP_DATA);
strcpy (data->group, buf);
data->nserv = news;
data->group = (char *) data + sizeof (NNTP_DATA);
strcpy (data->group, buf);
data->nserv = news;
hash_insert (news->newsgroups, data->group, data, 0);
nntp_add_to_list (news, data);
}
hash_insert (news->newsgroups, data->group, data, 0);
nntp_add_to_list (news, data);
}
url_parse_ciss (&url, c);
if (url.scheme == U_NNTP || url.scheme == U_NNTPS) {
url_parse_ciss (&url, c);
if (url.scheme == U_NNTP || url.scheme == U_NNTPS) {
mutt_account_tourl (acct, &url);
url_ciss_tostring (&url, line, len, 0);
mutt_account_tourl (acct, &url);
url_ciss_tostring (&url, line, len, 0);
strcpy (p, server);
if ((nntp_parse_url (buf, &acct, file, sizeof (file))) < 0 || *file) {
strcpy (p, server);
if ((nntp_parse_url (buf, &acct, file, sizeof (file))) < 0 || *file) {
serv->newsgroups = hash_create (1009);
slurp_newsrc (serv); /* load .newsrc */
nntp_parse_cacheindex (serv); /* load .index */
serv->newsgroups = hash_create (1009);
slurp_newsrc (serv); /* load .newsrc */
nntp_parse_cacheindex (serv); /* load .index */
line = *buf + (*pline - line);
}
strcpy (line, data->group);
line = *buf + (*pline - line);
}
strcpy (line, data->group);
if (series && first <= data->lastLoaded) {
if (data->num >= data->max) {
data->max = data->max * 2;
if (series && first <= data->lastLoaded) {
if (data->num >= data->max) {
data->max = data->max * 2;
/* we will generate full newsrc here */
for (tmp = news->list; tmp; tmp = tmp->next) {
data = (NNTP_DATA *) tmp->data;
/* we will generate full newsrc here */
for (tmp = news->list; tmp; tmp = tmp->next) {
data = (NNTP_DATA *) tmp->data;
continue;
nntp_create_newsrc_line (data, &buf, &line, &llen);
debug_print (2, ("Added to newsrc: %s\n", line));
continue;
nntp_create_newsrc_line (data, &buf, &line, &llen);
debug_print (2, ("Added to newsrc: %s\n", line));
if ((fd = mkstemp (buf)) == -1)
return NULL;
strcpy (s, pc); /* generated name */
if ((fd = mkstemp (buf)) == -1)
return NULL;
strcpy (s, pc); /* generated name */
((NNTP_DATA *) ctx->data)->nserv->conn->account.host,
((NNTP_DATA *) ctx->data)->group);
f = mutt_mkname (buf);
((NNTP_DATA *) ctx->data)->nserv->conn->account.host,
((NNTP_DATA *) ctx->data)->group);
f = mutt_mkname (buf);
- snprintf (buf, sizeof (buf), "\t" OFF_T_FMT "\t%d\tXref: %s\n",
+ snprintf (buf, sizeof (buf), "\t%zd\t%d\tXref: %s\n",
h->content->length, h->lines, NONULL (h->env->xref));
if (fputs (buf, f) == EOF) {
fclose (f);
h->content->length, h->lines, NONULL (h->env->xref));
if (fputs (buf, f) == EOF) {
fclose (f);
data->lastCached = 0;
nntp_cache_expand (buf, ".index");
mutt_update_list_file (buf, data->nserv->conn->account.host, data->group,
data->lastCached = 0;
nntp_cache_expand (buf, ".index");
mutt_update_list_file (buf, data->nserv->conn->account.host, data->group,
if (!news || !news->newsgroups || !group || !*group)
return NULL;
if (!(data = (NNTP_DATA *) hash_find (news->newsgroups, group))) {
if (!news || !news->newsgroups || !group || !*group)
return NULL;
if (!(data = (NNTP_DATA *) hash_find (news->newsgroups, group))) {
data->group = (char *) data + sizeof (NNTP_DATA);
strcpy (data->group, group);
data->nserv = news;
data->group = (char *) data + sizeof (NNTP_DATA);
strcpy (data->group, group);
data->nserv = news;