From c01e17f6b99066ca30931a082ea855656174619b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 15 Nov 2006 16:17:57 +0100 Subject: [PATCH] Fix compilation warnings and code clean up - Remove old commented code - Change name of folder_file struct so they do not shadow each others. It'd probably be better to use only one struct but the code is too big to look at that possibility. Signed-off-by: Julien Danjou Signed-off-by: Pierre Habouzit --- browser.c | 45 ++++++++------------------------------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/browser.c b/browser.c index 12c41a9..7fc0335 100644 --- a/browser.c +++ b/browser.c @@ -589,7 +589,7 @@ static int examine_mailboxes (MUTTMENU * menu, struct browser_state *state) else #endif { - unsigned int i = 0; + int i = 0; BUFFY* tmp; if (!Incoming) @@ -1351,29 +1351,15 @@ void _mutt_select_file (char *f, ssize_t flen, int flags, char ***files, case OP_CATCHUP: case OP_UNCATCHUP: if (option (OPTNEWS)) { - struct folder_file *f = &state.entry[menu->current]; + struct folder_file *folder_f = &state.entry[menu->current]; NNTP_DATA *nd; if (i == OP_CATCHUP) - nd = mutt_newsgroup_catchup (CurrentNewsSrv, f->name); + nd = mutt_newsgroup_catchup (CurrentNewsSrv, folder_f->name); else - nd = mutt_newsgroup_uncatchup (CurrentNewsSrv, f->name); + nd = mutt_newsgroup_uncatchup (CurrentNewsSrv, folder_f->name); if (nd) { -/* FOLDER folder; - struct folder_file ff; - char buffer[_POSIX_PATH_MAX + SHORT_STRING]; - - folder.ff = &ff; - folder.ff->name = f->name; - folder.ff->st = NULL; - folder.ff->is_new = nd->new; - folder.ff->nd = nd; - p_delete(&f->desc); - mutt_FormatString (buffer, sizeof (buffer), NONULL(GroupFormat), - newsgroup_format_str, (unsigned long) &folder, - M_FORMAT_ARROWCURSOR); - f->desc = m_strdup(buffer); */ if (menu->current + 1 < menu->max) menu->current++; menu->redraw = REDRAW_MOTION_RESYNCH; @@ -1448,29 +1434,14 @@ void _mutt_select_file (char *f, ssize_t flen, int flags, char ***files, } for (; j < state.entrylen; j++) { - struct folder_file *f = &state.entry[j]; + struct folder_file *folderf = &state.entry[j]; if (i == OP_BROWSER_SUBSCRIBE || i == OP_BROWSER_UNSUBSCRIBE || - regexec (rx, f->name, 0, NULL, 0) == 0) { + regexec (rx, folderf->name, 0, NULL, 0) == 0) { if (i == OP_BROWSER_SUBSCRIBE || i == OP_SUBSCRIBE_PATTERN) - nd = mutt_newsgroup_subscribe (news, f->name); + nd = mutt_newsgroup_subscribe (news, folderf->name); else - nd = mutt_newsgroup_unsubscribe (news, f->name); -/* if (nd) - { - FOLDER folder; - char buffer[_POSIX_PATH_MAX + SHORT_STRING]; - - folder.name = f->name; - folder.f = NULL; - folder.new = nd->new; - folder.nd = nd; - p_delete(&f->desc); - mutt_FormatString (buffer, sizeof (buffer), NONULL(GroupFormat), - newsgroup_format_str, (unsigned long) &folder, - M_FORMAT_ARROWCURSOR); - f->desc = m_strdup(buffer); - } */ + nd = mutt_newsgroup_unsubscribe (news, folderf->name); } if (i == OP_BROWSER_SUBSCRIBE || i == OP_BROWSER_UNSUBSCRIBE) { if (menu->current + 1 < menu->max) -- 2.20.1