From: Richard Russon Date: Thu, 5 Jan 2017 15:12:47 +0000 (+0000) Subject: build: fix function prototypes X-Git-Tag: neomutt-20170113~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f5acdc2a70b1a0a9b06fb3e8b82ae177a9eb3db;p=neomutt build: fix function prototypes --- diff --git a/alias.c b/alias.c index aa079ea83..0091ac792 100644 --- a/alias.c +++ b/alias.c @@ -383,7 +383,7 @@ retry_name: if (safe_fsync_close(&rc) != 0) mutt_message ("Trouble adding alias: %s.", strerror(errno)); else - mutt_message _("Alias added."); + mutt_message (_("Alias added.")); } else mutt_perror (buf); diff --git a/attach.c b/attach.c index e11a82c80..ac4c33337 100644 --- a/attach.c +++ b/attach.c @@ -802,8 +802,9 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) return (-1); } safe_fclose (&ofp); - if (safe_fsync_close (&nfp) != 0) { - mutt_error _("Write fault!"); + if (safe_fsync_close (&nfp) != 0) + { + mutt_error (_("Write fault!")); return (-1); } } diff --git a/browser.c b/browser.c index e029e6b50..360a04323 100644 --- a/browser.c +++ b/browser.c @@ -2002,7 +2002,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num } else if (!state.entrylen) { - mutt_error _("No newsgroups match the mask"); + mutt_error (_("No newsgroups match the mask")); break; } diff --git a/curs_main.c b/curs_main.c index 9bcb52ad7..d9d28c2e8 100644 --- a/curs_main.c +++ b/curs_main.c @@ -912,7 +912,7 @@ int mutt_index_menu (void) { if (Context->hdrs[i]->read == 0) { - mutt_message _("New mail in this mailbox."); + mutt_message (_("New mail in this mailbox.")); if (option (OPTBEEPNEW)) beep (); if (NewMailCmd) @@ -1217,7 +1217,7 @@ int mutt_index_menu (void) LIST *ref = CURHDR->env->references; if (!ref) { - mutt_error _("Article has no parent reference."); + mutt_error (_("Article has no parent reference.")); break; } strfcpy (buf, ref->data, sizeof (buf)); @@ -1240,7 +1240,7 @@ int mutt_index_menu (void) menu->redraw = REDRAW_MOTION_RESYNCH; } else - mutt_error _("Message is not visible in limited view."); + mutt_error (_("Message is not visible in limited view.")); } else { @@ -1275,11 +1275,11 @@ int mutt_index_menu (void) if (!CURHDR->env->message_id) { - mutt_error _("No Message-Id. Unable to perform operation."); + mutt_error (_("No Message-Id. Unable to perform operation.")); break; } - mutt_message _("Fetching message headers..."); + mutt_message (_("Fetching message headers...")); if (!Context->id_hash) Context->id_hash = mutt_make_id_hash (Context); strfcpy (buf, CURHDR->env->message_id, sizeof (buf)); @@ -1354,7 +1354,7 @@ int mutt_index_menu (void) } else if (rc >= 0) { - mutt_error _("No deleted messages found in the thread."); + mutt_error (_("No deleted messages found in the thread.")); /* Similar to OP_MAIN_ENTIRE_THREAD, keep displaying the old message, but update the index */ if (menu->menu == MENU_PAGER) @@ -1770,13 +1770,13 @@ int mutt_index_menu (void) { int oldcount = Context->msgcount; if (Context->magic != MUTT_NOTMUCH) { - mutt_message _("No virtual folder, aborting."); + mutt_message (_("No virtual folder, aborting.")); break; } CHECK_MSGCOUNT; CHECK_VISIBLE; if (nm_read_entire_thread(Context, CURHDR) < 0) { - mutt_message _("Failed to read thread, aborting."); + mutt_message (_("Failed to read thread, aborting.")); break; } if (oldcount < Context->msgcount) { @@ -1804,7 +1804,7 @@ int mutt_index_menu (void) case OP_MAIN_MODIFY_LABELS_THEN_HIDE: { if (Context->magic != MUTT_NOTMUCH) { - mutt_message _("No virtual folder, aborting."); + mutt_message (_("No virtual folder, aborting.")); break; } CHECK_MSGCOUNT; @@ -1812,7 +1812,7 @@ int mutt_index_menu (void) *buf = '\0'; if (mutt_get_field ("Add/remove labels: ", buf, sizeof (buf), MUTT_NM_TAG) || !*buf) { - mutt_message _("No label specified, aborting."); + mutt_message (_("No label specified, aborting.")); break; } if (tag) @@ -1845,7 +1845,7 @@ int mutt_index_menu (void) else { if (nm_modify_message_tags(Context, CURHDR, buf)) { - mutt_message _("Failed to modify labels, aborting."); + mutt_message (_("Failed to modify labels, aborting.")); break; } if (op == OP_MAIN_MODIFY_LABELS_THEN_HIDE) @@ -1879,11 +1879,11 @@ int mutt_index_menu (void) buf[0] = '\0'; if (mutt_get_field ("Query: ", buf, sizeof (buf), MUTT_NM_QUERY) != 0 || !buf[0]) { - mutt_message _("No query, aborting."); + mutt_message (_("No query, aborting.")); break; } if (!nm_uri_from_query(Context, buf, sizeof (buf))) - mutt_message _("Failed to create query, aborting."); + mutt_message (_("Failed to create query, aborting.")); else main_change_folder(menu, op, buf, sizeof (buf), &oldcount, &index_hint, 0); break; @@ -2684,7 +2684,7 @@ int mutt_index_menu (void) if ((Sort & SORT_MASK) != SORT_THREADS) { - mutt_error _("Threading is not enabled."); + mutt_error (_("Threading is not enabled.")); break; } collapse_all (menu, 1); @@ -2877,7 +2877,7 @@ int mutt_index_menu (void) mutt_message ("%d label%s changed.", rc, rc == 1 ? "" : "s"); } else { - mutt_message _("No labels changed."); + mutt_message (_("No labels changed.")); } break; @@ -3034,7 +3034,7 @@ int mutt_index_menu (void) else /* L10N: This error is printed if cannot find a Message-ID for the currently selected message in the index. */ - mutt_error _("No message ID to macro."); + mutt_error (_("No message ID to macro.")); break; case OP_RECALL_MESSAGE: diff --git a/handler.c b/handler.c index 014268f92..a9fb8483b 100644 --- a/handler.c +++ b/handler.c @@ -1629,7 +1629,7 @@ static int run_decode_and_handler (BODY *b, STATE *s, handler_t handler, int pla #ifdef USE_FMEMOPEN s->fpout = open_memstream (&temp, &tempsize); if (!s->fpout) { - mutt_error _("Unable to open memory stream!"); + mutt_error (_("Unable to open memory stream!")); dprint (1, (debugfile, "Can't open memory stream.\n")); return -1; } diff --git a/imap/imap.c b/imap/imap.c index 52d77664e..673e5e80a 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -306,7 +306,7 @@ static int imap_check_capabilities (IMAP_DATA* idata) if (!(mutt_bit_isset(idata->capabilities,IMAP4) ||mutt_bit_isset(idata->capabilities,IMAP4REV1))) { - mutt_error _("This IMAP server is ancient. NeoMutt does not work with it."); + mutt_error (_("This IMAP server is ancient. NeoMutt does not work with it.")); mutt_sleep (2); /* pause a moment to let the user see the error */ return -1; diff --git a/mutt_notmuch.c b/mutt_notmuch.c index 7b8cccd18..ebbea401d 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -1233,7 +1233,7 @@ done: release_db(data); if (ctx->msgcount == data->oldmsgcount) - mutt_message _("No more messages in the thread."); + mutt_message (_("No more messages in the thread.")); data->oldmsgcount = 0; dprint(1, (debugfile, "nm: reading entire-thread messages... done [rc=%d, count=%d]\n", @@ -1301,19 +1301,19 @@ char *nm_uri_from_windowed_query(CONTEXT *ctx, char *buf, size_t bufsz, char *ti return nm_uri_from_query(ctx, buf, bufsz); } -void nm_query_window_reset() +void nm_query_window_reset(void) { dprint(2, (debugfile, "nm_query_window_reset ()\n")); NotmuchQueryWindowCurrentPosition = 0; } -void nm_query_window_backward() +void nm_query_window_backward(void) { NotmuchQueryWindowCurrentPosition += 1; dprint(2, (debugfile, "nm_query_window_backward (%d)\n", NotmuchQueryWindowCurrentPosition)); } -void nm_query_window_forward() +void nm_query_window_forward(void) { if (NotmuchQueryWindowCurrentPosition != 0) NotmuchQueryWindowCurrentPosition -= 1; diff --git a/mutt_notmuch.h b/mutt_notmuch.h index c70590a11..21229c8bd 100644 --- a/mutt_notmuch.h +++ b/mutt_notmuch.h @@ -17,9 +17,9 @@ int nm_modify_message_tags(CONTEXT *ctx, HEADER *hdr, char *tags); void nm_setup_windowed_query(char *buf, size_t bufsz); char *nm_uri_from_windowed_query(CONTEXT *ctx, char *buf, size_t bufsz, char *timebase, int duration); -void nm_query_window_reset(); -void nm_query_window_backward(); -void nm_query_window_forward(); +void nm_query_window_reset(void); +void nm_query_window_backward(void); +void nm_query_window_forward(void); int nm_query_window_check_timebase(char *timebase); void nm_longrun_init(CONTEXT *cxt, int writable); diff --git a/muttlib.c b/muttlib.c index d124324ef..809728b1f 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1730,7 +1730,7 @@ int mutt_save_confirm (const char *s, struct stat *st) #ifdef USE_NNTP if (magic == MUTT_NNTP) { - mutt_error _("Can't save message to news server."); + mutt_error (_("Can't save message to news server.")); return 0; } #endif diff --git a/newsrc.c b/newsrc.c index bc2167f47..1cd2379f1 100644 --- a/newsrc.c +++ b/newsrc.c @@ -554,7 +554,7 @@ static int active_get_cache (NNTP_SERVER *nserv) } nserv->newgroups_time = t; - mutt_message _("Loading list of groups from cache..."); + mutt_message (_("Loading list of groups from cache...")); while (fgets (buf, sizeof (buf), fp)) nntp_add_group (buf, nserv); nntp_add_group (NULL, NULL); @@ -881,7 +881,7 @@ NNTP_SERVER *nntp_select_server (char *server, int leave_lock) if (!server || !*server) { - mutt_error _("No news server defined!"); + mutt_error (_("No news server defined!")); mutt_sleep (2); return NULL; } diff --git a/nntp.c b/nntp.c index 9fc8147ce..e99102711 100644 --- a/nntp.c +++ b/nntp.c @@ -64,7 +64,7 @@ static int nntp_connect_error (NNTP_SERVER *nserv) { nserv->status = NNTP_NONE; - mutt_error _("Server closed connection!"); + mutt_error (_("Server closed connection!")); mutt_sleep (2); return -1; } @@ -163,7 +163,7 @@ static int nntp_capabilities (NNTP_SERVER *nserv) mutt_socket_close (conn); nserv->status = NNTP_BYE; - mutt_error _("Server doesn't support reader mode."); + mutt_error (_("Server doesn't support reader mode.")); mutt_sleep (2); return -1; } @@ -349,7 +349,7 @@ static int nntp_auth (NNTP_SERVER *nserv) { if (!a) { - mutt_error _("No authenticators available"); + mutt_error (_("No authenticators available")); mutt_sleep (2); break; } @@ -592,7 +592,7 @@ static int nntp_auth (NNTP_SERVER *nserv) conn->account.flags = flags; if (conn->fd < 0) { - mutt_error _("Server closed connection!"); + mutt_error (_("Server closed connection!")); mutt_sleep (2); } else @@ -651,7 +651,7 @@ int nntp_open_connection (NNTP_SERVER *nserv) else if (nserv->hasCAPABILITIES) { mutt_socket_close (conn); - mutt_error _("Could not switch to reader mode."); + mutt_error (_("Could not switch to reader mode.")); mutt_sleep (2); return -1; } @@ -693,7 +693,7 @@ int nntp_open_connection (NNTP_SERVER *nserv) nserv->use_tls = 0; nserv->status = NNTP_NONE; mutt_socket_close (nserv->conn); - mutt_error _("Could not negotiate TLS connection"); + mutt_error (_("Could not negotiate TLS connection")); mutt_sleep (2); return -1; } @@ -736,7 +736,7 @@ int nntp_open_connection (NNTP_SERVER *nserv) if (cap > 0) { mutt_socket_close (conn); - mutt_error _("Could not switch to reader mode."); + mutt_error (_("Could not switch to reader mode.")); mutt_sleep (2); return -1; } @@ -1216,7 +1216,7 @@ static int nntp_fetch_headers (CONTEXT *ctx, void *hc, !nntp_data->deleted) { if (!ctx->quiet) - mutt_message _("Fetching list of articles..."); + mutt_message (_("Fetching list of articles...")); if (nntp_data->nserv->hasLISTGROUPrange) snprintf (buf, sizeof (buf), "LISTGROUP %s %d-%d\r\n", nntp_data->group, first, last); @@ -1975,7 +1975,7 @@ int nntp_check_mailbox (CONTEXT *ctx, int *index_hint) if (nserv->check_time + NewsPollTimeout > now) return 0; - mutt_message _("Checking for new messages..."); + mutt_message (_("Checking for new messages...")); if (nntp_newsrc_parse (nserv) < 0) return -1; @@ -2200,7 +2200,7 @@ int nntp_check_new_groups (NNTP_SERVER *nserv) /* check subscribed newsgroups for new articles */ if (option (OPTSHOWNEWNEWS)) { - mutt_message _("Checking for new messages..."); + mutt_message (_("Checking for new messages...")); for (i = 0; i < nserv->groups_num; i++) { NNTP_DATA *nntp_data = nserv->groups_list[i]; @@ -2415,7 +2415,7 @@ int nntp_check_children (CONTEXT *ctx, const char *msgid) if (mutt_strncmp ("500", buf, 3)) mutt_error ("XPAT: %s", buf); else - mutt_error _("Unable to find child articles because server does not support XPAT command."); + mutt_error (_("Unable to find child articles because server does not support XPAT command.")); } return -1; } diff --git a/pager.c b/pager.c index 60a3c7225..777696653 100644 --- a/pager.c +++ b/pager.c @@ -2050,7 +2050,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) if (h && (h->read == 0)) { - mutt_message _("New mail in this mailbox."); + mutt_message (_("New mail in this mailbox.")); do_new_mail = 1; break; } @@ -3078,7 +3078,7 @@ search_next: mutt_message ("%d label%s changed.", rc, rc == 1 ? "" : "s"); } else { - mutt_message _("No labels changed."); + mutt_message (_("No labels changed.")); } break; diff --git a/recvattach.c b/recvattach.c index b6fd2915e..e95fb5eb9 100644 --- a/recvattach.c +++ b/recvattach.c @@ -1145,7 +1145,7 @@ void mutt_view_attachments (HEADER *hdr) if (Context->magic == MUTT_NNTP) { mutt_flushinp (); - mutt_error _("Can't delete attachment from news server."); + mutt_error (_("Can't delete attachment from news server.")); break; } #endif diff --git a/recvcmd.c b/recvcmd.c index a00744dec..922b0d29b 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -781,7 +781,7 @@ attach_reply_envelope_defaults (ENVELOPE *env, ATTACHPTR **idx, short idxlen, if ((flags & SENDLISTREPLY) && !env->to) { - mutt_error _("No mailing lists found!"); + mutt_error (_("No mailing lists found!")); return (-1); } diff --git a/send.c b/send.c index 2f0c0a16f..aa98a438e 100644 --- a/send.c +++ b/send.c @@ -1792,7 +1792,7 @@ main_loop: /* abort */ #ifdef USE_NNTP if (flags & SENDNEWS) - mutt_message _("Article not posted."); + mutt_message (_("Article not posted.")); else #endif mutt_message _("Mail not sent."); @@ -1891,13 +1891,13 @@ main_loop: #ifdef USE_NNTP if ((flags & SENDNEWS) && !msg->env->subject) { - mutt_error _("No subject specified."); + mutt_error (_("No subject specified.")); goto main_loop; } if ((flags & SENDNEWS) && !msg->env->newsgroups) { - mutt_error _("No newsgroup specified."); + mutt_error (_("No newsgroup specified.")); goto main_loop; } #endif @@ -1910,7 +1910,7 @@ main_loop: /* if the abort is automatic, print an error message */ if (quadoption (OPT_ATTACH) == MUTT_YES) { - mutt_error _("Message contains text matching \"$attach_keyword\". Not sending."); + mutt_error (_("Message contains text matching \"$attach_keyword\". Not sending.")); } goto main_loop; } diff --git a/thread.c b/thread.c index 8f95faf5b..ea18c79e4 100644 --- a/thread.c +++ b/thread.c @@ -1102,15 +1102,15 @@ int mutt_parent_message (CONTEXT *ctx, HEADER *hdr, int find_root) if (!parent) { - mutt_error _("Parent message is not available."); + mutt_error (_("Parent message is not available.")); return (-1); } if (!VISIBLE (parent, ctx)) { if (find_root) - mutt_error _("Root message is not visible in this limited view."); + mutt_error (_("Root message is not visible in this limited view.")); else - mutt_error _("Parent message is not visible in this limited view."); + mutt_error (_("Parent message is not visible in this limited view.")); return (-1); } return (parent->virtual);