if (nntp_data)
nntp_data->deleted = true;
}
- nntp_active_fetch(nserv, 1);
+ nntp_active_fetch(nserv, true);
nntp_newsrc_update(nserv);
nntp_newsrc_close(nserv);
unset_option(OPT_NEWS);
if (op == OP_COMPOSE_ATTACH_NEWS_MESSAGE)
{
- CurrentNewsSrv = nntp_select_server(NewsServer, 0);
+ CurrentNewsSrv = nntp_select_server(NewsServer, false);
if (!CurrentNewsSrv)
break;
if (op == OP_MAIN_CHANGE_GROUP || op == OP_MAIN_CHANGE_GROUP_READONLY)
{
set_option(OPT_NEWS);
- CurrentNewsSrv = nntp_select_server(NewsServer, 0);
+ CurrentNewsSrv = nntp_select_server(NewsServer, false);
if (!CurrentNewsSrv)
break;
if (flags)
if (flags & MUTT_NEWS)
{
set_option(OPT_NEWS);
- CurrentNewsSrv = nntp_select_server(NewsServer, 0);
+ CurrentNewsSrv = nntp_select_server(NewsServer, false);
if (!CurrentNewsSrv)
{
mutt_endwin(ErrorBuf);
* system has broken mtimes, this might mean the file is reloaded every time,
* which we'd have to fix.
*/
-struct NntpServer *nntp_select_server(char *server, int leave_lock)
+struct NntpServer *nntp_select_server(char *server, bool leave_lock)
{
char file[_POSIX_PATH_MAX];
#ifdef USE_HCACHE
/* load list of newsgroups from server */
else
- rc = nntp_active_fetch(nserv, 0);
+ rc = nntp_active_fetch(nserv, false);
}
if (rc >= 0)
group = url.path;
url.path = strchr(url.path, '\0');
url_tostring(&url, server, sizeof(server), 0);
- nserv = nntp_select_server(server, 1);
+ nserv = nntp_select_server(server, true);
if (!nserv)
return -1;
CurrentNewsSrv = nserv;
nntp_data = Context->data;
else
{
- CurrentNewsSrv = nntp_select_server(NewsServer, 0);
+ CurrentNewsSrv = nntp_select_server(NewsServer, false);
if (!CurrentNewsSrv)
return -1;
/**
* nntp_active_fetch - Fetch list of all newsgroups from server
*/
-int nntp_active_fetch(struct NntpServer *nserv, unsigned int new)
+int nntp_active_fetch(struct NntpServer *nserv, bool new)
{
struct NntpData nntp_data;
char msg[STRING];
for (; i < nserv->groups_num; i++)
{
struct NntpData *data = nserv->groups_list[i];
- data->new = 1;
+ data->new = true;
}
}
for (; i < nserv->groups_num; i++)
{
struct NntpData *data = nserv->groups_list[i];
- data->new = 1;
+ data->new = true;
}
/* loading descriptions */
void nntp_delete_group_cache(struct NntpData *nntp_data);
/* exposed interface */
-struct NntpServer *nntp_select_server(char *server, int leave_lock);
+struct NntpServer *nntp_select_server(char *server, bool leave_lock);
struct NntpData *mutt_newsgroup_subscribe(struct NntpServer *nserv, char *group);
struct NntpData *mutt_newsgroup_unsubscribe(struct NntpServer *nserv, char *group);
struct NntpData *mutt_newsgroup_catchup(struct NntpServer *nserv, char *group);
struct NntpData *mutt_newsgroup_uncatchup(struct NntpServer *nserv, char *group);
-int nntp_active_fetch(struct NntpServer *nserv, unsigned int new);
+int nntp_active_fetch(struct NntpServer *nserv, bool new);
int nntp_newsrc_update(struct NntpServer *nserv);
int nntp_post(const char *msg);
int nntp_check_msgid(struct Context *ctx, const char *msgid);