From: Richard Russon Date: Wed, 15 Mar 2017 01:22:26 +0000 (+0000) Subject: tidy: limit the scope of some functions X-Git-Tag: neomutt-20170414~24^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3904a72b4c9f80f18e9ded3b57023570767fc9ad;p=neomutt tidy: limit the scope of some functions Functions that are only used in one file (compilation unit), should be declared "static". Also, they shouldn't have the prefix "mutt_". - make two functions static (only used in one place) - remove "mutt_" prefix - add missing "static" declaration --- diff --git a/alias.c b/alias.c index 048986269..d0186819a 100644 --- a/alias.c +++ b/alias.c @@ -39,7 +39,7 @@ ADDRESS *mutt_lookup_alias (const char *s) return (NULL); /* no such alias */ } -static ADDRESS *mutt_expand_aliases_r (ADDRESS *a, LIST **expn) +static ADDRESS *expand_aliases_r (ADDRESS *a, LIST **expn) { ADDRESS *head = NULL, *last = NULL, *t, *w; LIST *u; @@ -59,7 +59,7 @@ static ADDRESS *mutt_expand_aliases_r (ADDRESS *a, LIST **expn) { if (mutt_strcmp (a->mailbox, u->data) == 0) /* alias already found */ { - mutt_debug (1, "mutt_expand_aliases_r(): loop in alias found for '%s'\n", + mutt_debug (1, "expand_aliases_r(): loop in alias found for '%s'\n", a->mailbox); i = 1; break; @@ -73,7 +73,7 @@ static ADDRESS *mutt_expand_aliases_r (ADDRESS *a, LIST **expn) u->next = *expn; *expn = u; w = rfc822_cpy_adr (t, 0); - w = mutt_expand_aliases_r (w, expn); + w = expand_aliases_r (w, expn); if (head) last->next = w; else @@ -130,7 +130,7 @@ ADDRESS *mutt_expand_aliases (ADDRESS *a) ADDRESS *t; LIST *expn = NULL; /* previously expanded aliases to avoid loops */ - t = mutt_expand_aliases_r (a, &expn); + t = expand_aliases_r (a, &expn); mutt_free_list (&expn); return (mutt_remove_duplicates (t)); } diff --git a/attach.c b/attach.c index b55210916..5eeb78856 100644 --- a/attach.c +++ b/attach.c @@ -690,7 +690,7 @@ bail: } static FILE * -mutt_save_attachment_open (char *path, int flags) +save_attachment_open (char *path, int flags) { if (flags == MUTT_SAVE_APPEND) return fopen (path, "a"); @@ -757,7 +757,7 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) STATE s; memset (&s, 0, sizeof (s)); - if ((s.fpout = mutt_save_attachment_open (path, flags)) == NULL) + if ((s.fpout = save_attachment_open (path, flags)) == NULL) { mutt_perror ("fopen"); mutt_sleep (2); @@ -786,7 +786,7 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) return (-1); } - if ((nfp = mutt_save_attachment_open (path, flags)) == NULL) + if ((nfp = save_attachment_open (path, flags)) == NULL) { mutt_perror ("fopen"); safe_fclose (&ofp); diff --git a/browser.c b/browser.c index 6909559d0..e55eaa963 100644 --- a/browser.c +++ b/browser.c @@ -880,12 +880,11 @@ static void vfolder_entry (char *s, size_t slen, MUTTMENU *menu, int num) } #endif -/* Public function - * +/* * This function takes a menu and a state and defines the current * entry that should be highlighted. */ -static void mutt_browser_highlight_default (struct browser_state *state, MUTTMENU *menu) +static void browser_highlight_default (struct browser_state *state, MUTTMENU *menu) { menu->top = 0; /* Reset menu position to 1. @@ -981,10 +980,10 @@ static void init_menu (struct browser_state *state, MUTTMENU *menu, char *title, } } if (!matched) - mutt_browser_highlight_default(state, menu); + browser_highlight_default(state, menu); } else - mutt_browser_highlight_default(state, menu); + browser_highlight_default(state, menu); menu->redraw = REDRAW_FULL; } @@ -1388,7 +1387,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num goto bail; } } - mutt_browser_highlight_default (&state, menu); + browser_highlight_default (&state, menu); init_menu (&state, menu, title, sizeof (title), buffy); if (GotoSwapper[0]) GotoSwapper[0] = '\0'; @@ -1488,7 +1487,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num imap_browse (LastDir, &state); browser_sort (&state); menu->data = state.entry; - mutt_browser_highlight_default (&state, menu); + browser_highlight_default (&state, menu); init_menu (&state, menu, title, sizeof (title), buffy); MAYBE_REDRAW (menu->redraw); } @@ -1510,7 +1509,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num imap_browse (LastDir, &state); browser_sort (&state); menu->data = state.entry; - mutt_browser_highlight_default (&state, menu); + browser_highlight_default (&state, menu); init_menu (&state, menu, title, sizeof (title), buffy); MAYBE_REDRAW (menu->redraw); } @@ -1596,7 +1595,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num imap_browse (LastDir, &state); browser_sort (&state); menu->data = state.entry; - mutt_browser_highlight_default (&state, menu); + browser_highlight_default (&state, menu); init_menu (&state, menu, title, sizeof (title), buffy); } else @@ -1626,7 +1625,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num goto bail; } } - mutt_browser_highlight_default (&state, menu); + browser_highlight_default (&state, menu); init_menu (&state, menu, title, sizeof (title), buffy); } else @@ -1758,7 +1757,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num { BrowserSort |= reverse ? SORT_REVERSE : 0; browser_sort (&state); - mutt_browser_highlight_default (&state, menu); + browser_highlight_default (&state, menu); menu->redraw = REDRAW_FULL; } break; diff --git a/color.c b/color.c index 7fa4f4c3e..30922514f 100644 --- a/color.c +++ b/color.c @@ -128,7 +128,7 @@ static const struct mapping_t Fields[] = #define COLOR_QUOTE_INIT 8 -static COLOR_LINE *mutt_new_color_line (void) +static COLOR_LINE *new_color_line (void) { COLOR_LINE *p = safe_calloc (1, sizeof (COLOR_LINE)); @@ -137,7 +137,7 @@ static COLOR_LINE *mutt_new_color_line (void) return (p); } -static void mutt_free_color_line(COLOR_LINE **l, +static void free_color_line(COLOR_LINE **l, int free_colors) { COLOR_LINE *tmp; @@ -391,8 +391,8 @@ parse_color_name (const char *s, int *col, int *attr, int is_fg, BUFFER *err) #endif -void -mutt_do_uncolor (BUFFER *buf, BUFFER *s, COLOR_LINE **ColorList, +static void +do_uncolor (BUFFER *buf, BUFFER *s, COLOR_LINE **ColorList, int *do_cache, int parse_uncolor) { COLOR_LINE *tmp, *last = NULL; @@ -410,7 +410,7 @@ mutt_do_uncolor (BUFFER *buf, BUFFER *s, COLOR_LINE **ColorList, } last = tmp; tmp = tmp->next; - mutt_free_color_line (&last, parse_uncolor); + free_color_line (&last, parse_uncolor); } *ColorList = NULL; } @@ -434,7 +434,7 @@ mutt_do_uncolor (BUFFER *buf, BUFFER *s, COLOR_LINE **ColorList, { *ColorList = tmp->next; } - mutt_free_color_line (&tmp, parse_uncolor); + free_color_line (&tmp, parse_uncolor); break; } } @@ -505,22 +505,22 @@ static int _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data, } if (object == MT_COLOR_BODY) - mutt_do_uncolor (buf, s, &ColorBodyList, &do_cache, parse_uncolor); + do_uncolor (buf, s, &ColorBodyList, &do_cache, parse_uncolor); else if (object == MT_COLOR_HEADER) - mutt_do_uncolor (buf, s, &ColorHdrList, &do_cache, parse_uncolor); + do_uncolor (buf, s, &ColorHdrList, &do_cache, parse_uncolor); else if (object == MT_COLOR_ATTACH_HEADERS) - mutt_do_uncolor (buf, s, &ColorAttachList, &do_cache, parse_uncolor); + do_uncolor (buf, s, &ColorAttachList, &do_cache, parse_uncolor); else if (object == MT_COLOR_INDEX) - mutt_do_uncolor (buf, s, &ColorIndexList, &do_cache, parse_uncolor); + do_uncolor (buf, s, &ColorIndexList, &do_cache, parse_uncolor); else if (object == MT_COLOR_INDEX_AUTHOR) - mutt_do_uncolor (buf, s, &ColorIndexAuthorList, &do_cache, parse_uncolor); + do_uncolor (buf, s, &ColorIndexAuthorList, &do_cache, parse_uncolor); else if (object == MT_COLOR_INDEX_FLAGS) - mutt_do_uncolor (buf, s, &ColorIndexFlagsList, &do_cache, parse_uncolor); + do_uncolor (buf, s, &ColorIndexFlagsList, &do_cache, parse_uncolor); else if (object == MT_COLOR_INDEX_SUBJECT) - mutt_do_uncolor (buf, s, &ColorIndexSubjectList, &do_cache, parse_uncolor); + do_uncolor (buf, s, &ColorIndexSubjectList, &do_cache, parse_uncolor); #ifdef USE_NOTMUCH else if (object == MT_COLOR_INDEX_TAG) - mutt_do_uncolor(buf, s, &ColorIndexTagList, &do_cache, parse_uncolor); + do_uncolor(buf, s, &ColorIndexTagList, &do_cache, parse_uncolor); #endif if (do_cache && !option (OPTNOCURSES)) @@ -601,7 +601,7 @@ add_pattern (COLOR_LINE **top, const char *s, int sensitive, int r; char buf[LONG_STRING]; - tmp = mutt_new_color_line (); + tmp = new_color_line (); if (is_index) { int i; @@ -610,7 +610,7 @@ add_pattern (COLOR_LINE **top, const char *s, int sensitive, mutt_check_simple (buf, sizeof (buf), NONULL(SimpleSearch)); if((tmp->color_pattern = mutt_pattern_comp (buf, MUTT_FULL_MSG, err)) == NULL) { - mutt_free_color_line(&tmp, 1); + free_color_line(&tmp, 1); return -1; } /* force re-caching of index colors */ @@ -620,7 +620,7 @@ add_pattern (COLOR_LINE **top, const char *s, int sensitive, else if ((r = REGCOMP (&tmp->rx, s, (sensitive ? mutt_which_case (s) : REG_ICASE))) != 0) { regerror (r, &tmp->rx, err->data, err->dsize); - mutt_free_color_line(&tmp, 1); + free_color_line(&tmp, 1); return (-1); } tmp->next = *top; diff --git a/compress.c b/compress.c index deb8d8e2c..585dc0a6a 100644 --- a/compress.c +++ b/compress.c @@ -272,11 +272,11 @@ set_compress_info (CONTEXT *ctx) } /** - * mutt_free_compress_info - Frees the compress info members and structure. + * free_compress_info - Frees the compress info members and structure. * @ctx: Mailbox to free compress_info for. */ static void -mutt_free_compress_info (CONTEXT *ctx) +free_compress_info (CONTEXT *ctx) { COMPRESS_INFO *ci; @@ -505,7 +505,7 @@ open_mailbox (CONTEXT *ctx) or_fail: /* remove the partial uncompressed file */ remove (ctx->path); - mutt_free_compress_info (ctx); + free_compress_info (ctx); return -1; } @@ -588,7 +588,7 @@ oa_fail2: remove (ctx->path); oa_fail1: /* Free the compress_info to prevent close from trying to recompress */ - mutt_free_compress_info (ctx); + free_compress_info (ctx); return -1; } @@ -617,7 +617,7 @@ close_mailbox (CONTEXT *ctx) struct mx_ops *ops = ci->child_ops; if (!ops) { - mutt_free_compress_info (ctx); + free_compress_info (ctx); return -1; } @@ -665,7 +665,7 @@ close_mailbox (CONTEXT *ctx) unlock_realpath (ctx); } - mutt_free_compress_info (ctx); + free_compress_info (ctx); return 0; } diff --git a/curs_lib.c b/curs_lib.c index 3848561e3..f888d77b6 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -1106,7 +1106,7 @@ void mutt_format_string (char *dest, size_t destlen, * the number of character cells when printed. */ -static void mutt_format_s_x (char *dest, +static void format_s_x (char *dest, size_t destlen, const char *prefix, const char *s, @@ -1139,7 +1139,7 @@ void mutt_format_s (char *dest, const char *prefix, const char *s) { - mutt_format_s_x (dest, destlen, prefix, s, 0); + format_s_x (dest, destlen, prefix, s, 0); } void mutt_format_s_tree (char *dest, @@ -1147,7 +1147,7 @@ void mutt_format_s_tree (char *dest, const char *prefix, const char *s) { - mutt_format_s_x (dest, destlen, prefix, s, 1); + format_s_x (dest, destlen, prefix, s, 1); } /* diff --git a/group.c b/group.c index 32b6af8ab..e1b11b365 100644 --- a/group.c +++ b/group.c @@ -51,7 +51,7 @@ group_t *mutt_pattern_group (const char *k) return p; } -static void mutt_group_remove (group_t *g) +static void group_remove (group_t *g) { if (!g) return; @@ -67,7 +67,7 @@ int mutt_group_context_clear (group_context_t **ctx) group_context_t *t; for ( ; ctx && *ctx; (*ctx) = t) { - mutt_group_remove ((*ctx)->g); + group_remove ((*ctx)->g); t = (*ctx)->next; FREE(ctx); /* __FREE_CHECKED__ */ } @@ -103,7 +103,7 @@ void mutt_group_context_destroy (group_context_t **ctx) } } -static void mutt_group_add_adrlist (group_t *g, ADDRESS *a) +static void group_add_adrlist (group_t *g, ADDRESS *a) { ADDRESS **p, *q; @@ -120,7 +120,7 @@ static void mutt_group_add_adrlist (group_t *g, ADDRESS *a) *p = q; } -static int mutt_group_remove_adrlist (group_t *g, ADDRESS *a) +static int group_remove_adrlist (group_t *g, ADDRESS *a) { ADDRESS *p; @@ -135,12 +135,12 @@ static int mutt_group_remove_adrlist (group_t *g, ADDRESS *a) return 0; } -static int mutt_group_add_rx (group_t *g, const char *s, int flags, BUFFER *err) +static int group_add_rx (group_t *g, const char *s, int flags, BUFFER *err) { return mutt_add_to_rx_list (&g->rs, s, flags, err); } -static int mutt_group_remove_rx (group_t *g, const char *s) +static int group_remove_rx (group_t *g, const char *s) { return mutt_remove_from_rx_list (&g->rs, s); } @@ -148,7 +148,7 @@ static int mutt_group_remove_rx (group_t *g, const char *s) void mutt_group_context_add_adrlist (group_context_t *ctx, ADDRESS *a) { for (; ctx; ctx = ctx->next) - mutt_group_add_adrlist (ctx->g, a); + group_add_adrlist (ctx->g, a); } int mutt_group_context_remove_adrlist (group_context_t *ctx, ADDRESS * a) @@ -157,9 +157,9 @@ int mutt_group_context_remove_adrlist (group_context_t *ctx, ADDRESS * a) for (; (!rv) && ctx; ctx = ctx->next) { - rv = mutt_group_remove_adrlist (ctx->g, a); + rv = group_remove_adrlist (ctx->g, a); if (empty_group (ctx->g)) - mutt_group_remove (ctx->g); + group_remove (ctx->g); } return rv; @@ -170,7 +170,7 @@ int mutt_group_context_add_rx (group_context_t *ctx, const char *s, int flags, B int rv = 0; for (; (!rv) && ctx; ctx = ctx->next) - rv = mutt_group_add_rx (ctx->g, s, flags, err); + rv = group_add_rx (ctx->g, s, flags, err); return rv; } @@ -181,9 +181,9 @@ int mutt_group_context_remove_rx (group_context_t *ctx, const char *s) for (; (!rv) && ctx; ctx = ctx->next) { - rv = mutt_group_remove_rx (ctx->g, s); + rv = group_remove_rx (ctx->g, s); if (empty_group (ctx->g)) - mutt_group_remove (ctx->g); + group_remove (ctx->g); } return rv; diff --git a/handler.c b/handler.c index 66e11c9c9..760c50f54 100644 --- a/handler.c +++ b/handler.c @@ -92,7 +92,7 @@ static void state_prefix_put (const char *d, size_t dlen, STATE *s) fwrite (d, dlen, 1, s->fpout); } -static void mutt_convert_to_state(iconv_t cd, char *bufi, size_t *l, STATE *s) +static void convert_to_state(iconv_t cd, char *bufi, size_t *l, STATE *s) { char bufo[BUFO_SIZE]; ICONV_CONST char *ib; @@ -131,7 +131,7 @@ static void mutt_convert_to_state(iconv_t cd, char *bufi, size_t *l, STATE *s) *l = ibl; } -static void mutt_decode_xbit (STATE *s, long len, int istext, iconv_t cd) +static void decode_xbit (STATE *s, long len, int istext, iconv_t cd) { int c, ch; char bufi[BUFI_SIZE]; @@ -156,11 +156,11 @@ static void mutt_decode_xbit (STATE *s, long len, int istext, iconv_t cd) bufi[l++] = c; if (l == sizeof (bufi)) - mutt_convert_to_state (cd, bufi, &l, s); + convert_to_state (cd, bufi, &l, s); } - mutt_convert_to_state (cd, bufi, &l, s); - mutt_convert_to_state (cd, 0, 0, s); + convert_to_state (cd, bufi, &l, s); + convert_to_state (cd, 0, 0, s); state_reset_prefix (s); } @@ -238,7 +238,7 @@ static void qp_decode_line (char *dest, char *src, size_t *l, * result of qp_decode_line. * * Finally, at soft line breaks, some part of a multibyte character - * may have been left over by mutt_convert_to_state(). This shouldn't + * may have been left over by convert_to_state(). This shouldn't * be more than 6 characters, so STRING + 7 should be sufficient * memory to store the decoded data. * @@ -247,7 +247,7 @@ static void qp_decode_line (char *dest, char *src, size_t *l, * */ -static void mutt_decode_quoted (STATE *s, long len, int istext, iconv_t cd) +static void decode_quoted (STATE *s, long len, int istext, iconv_t cd) { char line[STRING]; char decline[2*STRING]; @@ -294,10 +294,10 @@ static void mutt_decode_quoted (STATE *s, long len, int istext, iconv_t cd) /* decode and do character set conversion */ qp_decode_line (decline + l, line, &l3, last); l += l3; - mutt_convert_to_state (cd, decline, &l, s); + convert_to_state (cd, decline, &l, s); } - mutt_convert_to_state (cd, 0, 0, s); + convert_to_state (cd, 0, 0, s); state_reset_prefix(s); } @@ -374,13 +374,13 @@ void mutt_decode_base64 (STATE *s, long len, int istext, iconv_t cd) bufi[l++] = ch; if (l + 8 >= sizeof (bufi)) - mutt_convert_to_state (cd, bufi, &l, s); + convert_to_state (cd, bufi, &l, s); } if (cr) bufi[l++] = '\r'; - mutt_convert_to_state (cd, bufi, &l, s); - mutt_convert_to_state (cd, 0, 0, s); + convert_to_state (cd, bufi, &l, s); + convert_to_state (cd, 0, 0, s); state_reset_prefix(s); } @@ -392,7 +392,7 @@ static unsigned char decode_byte (char ch) return ch - 32; } -static void mutt_decode_uuencoded (STATE *s, long len, int istext, iconv_t cd) +static void decode_uuencoded (STATE *s, long len, int istext, iconv_t cd) { char tmps[SHORT_STRING]; char linelen, c, l, out; @@ -433,13 +433,13 @@ static void mutt_decode_uuencoded (STATE *s, long len, int istext, iconv_t cd) if (c == linelen) break; } - mutt_convert_to_state (cd, bufi, &k, s); + convert_to_state (cd, bufi, &k, s); pt++; } } - mutt_convert_to_state (cd, bufi, &k, s); - mutt_convert_to_state (cd, 0, 0, s); + convert_to_state (cd, bufi, &k, s); + convert_to_state (cd, 0, 0, s); state_reset_prefix(s); } @@ -971,17 +971,17 @@ static int is_mmnoask (const char *buf) * * 0 otherwise */ -static int mutt_is_autoview (BODY *b) +static int is_autoview (BODY *b) { char type[SHORT_STRING]; - int is_autoview = 0; + int is_av = 0; snprintf (type, sizeof (type), "%s/%s", TYPE (b), b->subtype); if (option(OPTIMPLICITAUTOVIEW)) { /* $implicit_autoview is essentially the same as "auto_view *" */ - is_autoview = 1; + is_av = 1; } else { @@ -994,17 +994,17 @@ static int mutt_is_autoview (BODY *b) if ((i > 0 && t->data[i-1] == '/' && t->data[i] == '*' && ascii_strncasecmp (type, t->data, i) == 0) || ascii_strcasecmp (type, t->data) == 0) - is_autoview = 1; + is_av = 1; } if (is_mmnoask (type)) - is_autoview = 1; + is_av = 1; } /* determine if there is a mailcap entry suitable for auto_view * * WARNING: type is altered by this call as a result of `mime_lookup' support */ - if (is_autoview) + if (is_av) return rfc1524_mailcap_lookup(b, type, NULL, MUTT_AUTOVIEW); return 0; @@ -1090,7 +1090,7 @@ static int alternative_handler (BODY *a, STATE *s) b = a; while (b) { - if (mutt_is_autoview (b)) + if (is_autoview (b)) choice = b; b = b->next; } @@ -1234,7 +1234,7 @@ static int message_handler (BODY *a, STATE *s) /* returns 1 if decoding the attachment will produce output */ int mutt_can_decode (BODY *a) { - if (mutt_is_autoview (a)) + if (is_autoview (a)) return 1; else if (a->type == TYPETEXT) return (1); @@ -1586,16 +1586,16 @@ void mutt_decode_attachment (BODY *b, STATE *s) switch (b->encoding) { case ENCQUOTEDPRINTABLE: - mutt_decode_quoted (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); + decode_quoted (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); break; case ENCBASE64: mutt_decode_base64 (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); break; case ENCUUENCODED: - mutt_decode_uuencoded (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); + decode_uuencoded (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); break; default: - mutt_decode_xbit (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); + decode_xbit (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); break; } @@ -1800,7 +1800,7 @@ int mutt_body_handler (BODY *b, STATE *s) /* first determine which handler to use to process this part */ - if (mutt_is_autoview (b)) + if (is_autoview (b)) { handler = autoview_handler; s->flags &= ~MUTT_CHARCONV; diff --git a/hcache.c b/hcache.c index de11fbb3c..ed7976b74 100644 --- a/hcache.c +++ b/hcache.c @@ -553,7 +553,7 @@ static int create_hcache_dir(const char *path) } /** - * mutt_hcache_per_folder - Generate the hcache pathname + * hcache_per_folder - Generate the hcache pathname * @param path Base directory, from $header_cache * @param folder Mailbox name (including protocol) * @param namer Callback to generate database filename @@ -577,7 +577,7 @@ static int create_hcache_dir(const char *path) * If ICONV isn't being used, then a suffix is added to the path, e.g. '-utf-8'. * Otherise @path is assumed to be a file. */ -static const char *mutt_hcache_per_folder(const char *path, const char *folder, +static const char *hcache_per_folder(const char *path, const char *folder, hcache_namer_t namer) { static char hcpath[_POSIX_PATH_MAX]; @@ -631,7 +631,7 @@ static const char *mutt_hcache_per_folder(const char *path, const char *folder, * db_store. */ static void * -mutt_hcache_dump(header_cache_t *h, HEADER * header, int *off, +hcache_dump(header_cache_t *h, HEADER * header, int *off, unsigned int uidvalidity) { unsigned char *d = NULL; @@ -786,7 +786,7 @@ mutt_hcache_open(const char *path, const char *folder, hcache_namer_t namer) return NULL; } - path = mutt_hcache_per_folder(path, h->folder, namer); + path = hcache_per_folder(path, h->folder, namer); h->ctx = ops->open(path); if (h->ctx) @@ -874,7 +874,7 @@ mutt_hcache_store(header_cache_t *h, const char *key, size_t keylen, if (!h) return -1; - data = mutt_hcache_dump(h, header, &dlen, uidvalidity); + data = hcache_dump(h, header, &dlen, uidvalidity); ret = mutt_hcache_store_raw (h, key, keylen, data, dlen); FREE(&data); diff --git a/hdrline.c b/hdrline.c index 5e38a3083..08876b8d4 100644 --- a/hdrline.c +++ b/hdrline.c @@ -290,7 +290,7 @@ static int user_in_addr (ADDRESS *a) * 4: user is originator * 5: sent to a subscribed mailinglist */ -static int mutt_user_is_recipient (HEADER *h) +static int user_is_recipient (HEADER *h) { if (!h || !h->env) return 0; @@ -1022,7 +1022,7 @@ hdr_format_str (char *dest, case 'T': snprintf (fmt, sizeof (fmt), "%%%ss", prefix); snprintf (dest, destlen, fmt, - (Tochars && ((i = mutt_user_is_recipient (hdr))) < Tochars->len) ? Tochars->chars[i] : " "); + (Tochars && ((i = user_is_recipient (hdr))) < Tochars->len) ? Tochars->chars[i] : " "); break; case 'u': @@ -1117,7 +1117,7 @@ hdr_format_str (char *dest, else if (hdr->flagged) third = get_nth_wchar (Flagchars, FlagCharImportant); else - third = get_nth_wchar (Tochars, mutt_user_is_recipient (hdr)); + third = get_nth_wchar (Tochars, user_is_recipient (hdr)); snprintf (buf2, sizeof (buf2), "%s%s%s", first, second, third); } diff --git a/hook.c b/hook.c index 01fc25926..3f05981db 100644 --- a/hook.c +++ b/hook.c @@ -411,7 +411,7 @@ void mutt_message_hook (CONTEXT *ctx, HEADER *hdr, int type) } static int -mutt_addr_hook (char *path, size_t pathlen, int type, CONTEXT *ctx, HEADER *hdr) +addr_hook (char *path, size_t pathlen, int type, CONTEXT *ctx, HEADER *hdr) { HOOK *hook; pattern_cache_t cache; @@ -437,7 +437,7 @@ mutt_addr_hook (char *path, size_t pathlen, int type, CONTEXT *ctx, HEADER *hdr) void mutt_default_save (char *path, size_t pathlen, HEADER *hdr) { *path = 0; - if (mutt_addr_hook (path, pathlen, MUTT_SAVEHOOK, Context, hdr) != 0) + if (addr_hook (path, pathlen, MUTT_SAVEHOOK, Context, hdr) != 0) { char tmp[_POSIX_PATH_MAX]; ADDRESS *adr; @@ -468,7 +468,7 @@ void mutt_select_fcc (char *path, size_t pathlen, HEADER *hdr) char buf[_POSIX_PATH_MAX]; ENVELOPE *env = hdr->env; - if (mutt_addr_hook (path, pathlen, MUTT_FCCHOOK, NULL, hdr) != 0) + if (addr_hook (path, pathlen, MUTT_FCCHOOK, NULL, hdr) != 0) { if ((option (OPTSAVENAME) || option (OPTFORCENAME)) && (env->to || env->cc || env->bcc)) diff --git a/init.c b/init.c index 6b7e9fcc6..e6bb38919 100644 --- a/init.c +++ b/init.c @@ -485,7 +485,7 @@ int mutt_option_set(const struct option_t *val, BUFFER *err) } #endif -static void mutt_free_opt (struct option_t* p) +static void free_opt (struct option_t* p) { REGEXP* pp; @@ -516,7 +516,7 @@ void mutt_free_opts (void) int i; for (i = 0; MuttVars[i].option; i++) - mutt_free_opt (MuttVars + i); + free_opt (MuttVars + i); mutt_free_rx_list (&Alternates); mutt_free_rx_list (&UnAlternates); @@ -562,6 +562,11 @@ static void add_to_list (LIST **list, const char *str) } } +static RX_LIST *new_rx_list(void) +{ + return safe_calloc (1, sizeof (RX_LIST)); +} + int mutt_add_to_rx_list (RX_LIST **list, const char *s, int flags, BUFFER *err) { RX_LIST *t, *last = NULL; @@ -591,7 +596,7 @@ int mutt_add_to_rx_list (RX_LIST **list, const char *s, int flags, BUFFER *err) if (!*list || last) { - t = mutt_new_rx_list(); + t = new_rx_list(); t->rx = rx; if (last) { @@ -644,6 +649,11 @@ static int remove_from_replace_list (REPLACE_LIST **list, const char *pat) return nremoved; } +static REPLACE_LIST *new_replace_list(void) +{ + return safe_calloc (1, sizeof (REPLACE_LIST)); +} + static int add_to_replace_list (REPLACE_LIST **list, const char *pat, const char *templ, BUFFER *err) { REPLACE_LIST *t = NULL, *last = NULL; @@ -684,7 +694,7 @@ static int add_to_replace_list (REPLACE_LIST **list, const char *pat, const char */ if (!t) { - t = mutt_new_replace_list(); + t = new_replace_list(); t->rx = rx; rx = NULL; if (last) @@ -1865,7 +1875,7 @@ static void set_default (struct option_t *p) } } -static void mutt_restore_default (struct option_t *p) +static void restore_default (struct option_t *p) { switch (p->type & DT_MASK) { @@ -1936,7 +1946,7 @@ static void mutt_restore_default (struct option_t *p) { char msgbuf[STRING]; regerror (retval, pp->rx, msgbuf, sizeof (msgbuf)); - fprintf (stderr, _("mutt_restore_default(%s): error in regexp: %s\n"), + fprintf (stderr, _("restore_default(%s): error in regexp: %s\n"), p->option, pp->pattern); fprintf (stderr, "%s\n", msgbuf); mutt_sleep (0); @@ -2268,7 +2278,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) return (-1); } for (idx = 0; MuttVars[idx].option; idx++) - mutt_restore_default (&MuttVars[idx]); + restore_default (&MuttVars[idx]); set_option (OPTFORCEREDRAWINDEX); set_option (OPTFORCEREDRAWPAGER); set_option (OPTSORTSUBTHREADS); @@ -2283,7 +2293,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) if (myvar) myvar_del (myvar); else - mutt_restore_default (&MuttVars[idx]); + restore_default (&MuttVars[idx]); } } else if (!myvar && DTYPE (MuttVars[idx].type) == DT_BOOL) @@ -3641,7 +3651,7 @@ static void start_debug (void) } #endif -static int mutt_execute_commands (LIST *p) +static int execute_commands (LIST *p) { BUFFER err, token; @@ -3666,7 +3676,7 @@ static int mutt_execute_commands (LIST *p) return 0; } -static char* mutt_find_cfg (const char *home, const char *xdg_cfg_home) +static char* find_cfg (const char *home, const char *xdg_cfg_home) { const char* names[] = { @@ -3911,7 +3921,7 @@ void mutt_init (int skip_sys_rc, LIST *commands) for (i = 0; MuttVars[i].option; i++) { set_default (&MuttVars[i]); - mutt_restore_default (&MuttVars[i]); + restore_default (&MuttVars[i]); } CurrentMenu = MENU_MAIN; @@ -3953,7 +3963,7 @@ void mutt_init (int skip_sys_rc, LIST *commands) xdg_cfg_home = buffer; } - char *config = mutt_find_cfg (Homedir, xdg_cfg_home); + char *config = find_cfg (Homedir, xdg_cfg_home); if (config) { Muttrc = mutt_add_list (Muttrc, config); @@ -4049,7 +4059,7 @@ void mutt_init (int skip_sys_rc, LIST *commands) } } - if (mutt_execute_commands (commands) != 0) + if (execute_commands (commands) != 0) need_pause = 1; if (need_pause && !option (OPTNOCURSES)) diff --git a/lib.c b/lib.c index 7dd1a6246..7e565f87a 100644 --- a/lib.c +++ b/lib.c @@ -562,7 +562,7 @@ int safe_rename (const char *src, const char *target) /* Create a temporary directory next to a file name */ -static int mutt_mkwrapdir (const char *path, char *newfile, size_t nflen, +static int mkwrapdir (const char *path, char *newfile, size_t nflen, char *newdir, size_t ndlen) { const char *basename; @@ -585,14 +585,14 @@ static int mutt_mkwrapdir (const char *path, char *newfile, size_t nflen, snprintf (newdir, ndlen, "%s/%s", parent, ".muttXXXXXX"); if (mkdtemp(newdir) == NULL) { - mutt_debug (1, "mutt_mkwrapdir: mkdtemp() failed\n"); + mutt_debug (1, "mkwrapdir: mkdtemp() failed\n"); return -1; } if (snprintf (newfile, nflen, "%s/%s", newdir, NONULL(basename)) >= nflen) { rmdir(newdir); - mutt_debug (1, "mutt_mkwrapdir: string was truncated\n"); + mutt_debug (1, "mkwrapdir: string was truncated\n"); return -1; } return 0; @@ -638,7 +638,7 @@ int mutt_rmtree (const char* path) return rc; } -static int mutt_put_file_in_place (const char *path, const char *safe_file, const char *safe_dir) +static int put_file_in_place (const char *path, const char *safe_file, const char *safe_dir) { int rv; @@ -658,7 +658,7 @@ int safe_open (const char *path, int flags) char safe_file[_POSIX_PATH_MAX]; char safe_dir[_POSIX_PATH_MAX]; - if (mutt_mkwrapdir (path, safe_file, sizeof (safe_file), + if (mkwrapdir (path, safe_file, sizeof (safe_file), safe_dir, sizeof (safe_dir)) == -1) return -1; @@ -670,7 +670,7 @@ int safe_open (const char *path, int flags) /* NFS and I believe cygwin do not handle movement of open files well */ close (fd); - if (mutt_put_file_in_place (path, safe_file, safe_dir) == -1) + if (put_file_in_place (path, safe_file, safe_dir) == -1) return -1; } diff --git a/main.c b/main.c index 49906ddb4..09c289f44 100644 --- a/main.c +++ b/main.c @@ -76,7 +76,7 @@ void mutt_exit (int code) exit (code); } -static void mutt_usage (void) +static void usage (void) { puts (mutt_make_version ()); @@ -399,7 +399,7 @@ int main (int argc, char **argv, char **environ) break; default: - mutt_usage (); + usage (); } } diff --git a/mbox.c b/mbox.c index eef238784..f9bb3020d 100644 --- a/mbox.c +++ b/mbox.c @@ -664,7 +664,7 @@ int mbox_strict_cmp_headers (const HEADER *h1, const HEADER *h2) } } -static int mutt_reopen_mailbox (CONTEXT *ctx, int *index_hint) +static int reopen_mailbox (CONTEXT *ctx, int *index_hint) { int (*cmp_headers) (const HEADER *, const HEADER *) = NULL; HEADER **old_hdrs; @@ -936,7 +936,7 @@ static int mbox_check_mailbox (CONTEXT *ctx, int *index_hint) if (modified) { - if (mutt_reopen_mailbox (ctx, index_hint) != -1) + if (reopen_mailbox (ctx, index_hint) != -1) { if (unlock) { diff --git a/mutt.h b/mutt.h index 076d68742..ef7e1c1bb 100644 --- a/mutt.h +++ b/mutt.h @@ -640,16 +640,6 @@ static inline LIST *mutt_new_list(void) return safe_calloc (1, sizeof (LIST)); } -static inline RX_LIST *mutt_new_rx_list() -{ - return safe_calloc (1, sizeof (RX_LIST)); -} - -static inline REPLACE_LIST *mutt_new_replace_list() -{ - return safe_calloc (1, sizeof (REPLACE_LIST)); -} - void mutt_free_list(LIST **list); void mutt_free_rx_list(RX_LIST **list); void mutt_free_replace_list(REPLACE_LIST **list); diff --git a/parse.c b/parse.c index 33cc81696..33e2bbde3 100644 --- a/parse.c +++ b/parse.c @@ -93,7 +93,7 @@ char *mutt_read_rfc822_line (FILE *f, char *line, size_t *linelen) /* not reached */ } -static LIST *mutt_parse_references (char *s, int in_reply_to) +static LIST *parse_references (char *s, int in_reply_to) { LIST *t, *lst = NULL; char *m; @@ -1094,7 +1094,7 @@ int mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p, short if (!ascii_strcasecmp (line+1, "n-reply-to")) { mutt_free_list (&e->in_reply_to); - e->in_reply_to = mutt_parse_references (p, 1); + e->in_reply_to = parse_references (p, 1); matched = 1; } break; @@ -1195,7 +1195,7 @@ int mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p, short if (!ascii_strcasecmp (line + 1, "eferences")) { mutt_free_list (&e->references); - e->references = mutt_parse_references (p, 0); + e->references = parse_references (p, 0); matched = 1; } else if (!ascii_strcasecmp (line + 1, "eply-to")) diff --git a/recvattach.c b/recvattach.c index a65532b42..9f5404a9e 100644 --- a/recvattach.c +++ b/recvattach.c @@ -429,7 +429,7 @@ static void prepend_curdir (char *dst, size_t dstlen) dst[l + 2] = 0; } -static int mutt_query_save_attachment (FILE *fp, BODY *body, HEADER *hdr, char **directory) +static int query_save_attachment (FILE *fp, BODY *body, HEADER *hdr, char **directory) { char *prompt; char buf[_POSIX_PATH_MAX], tfile[_POSIX_PATH_MAX]; @@ -571,7 +571,7 @@ void mutt_save_attachment_list (FILE *fp, int tag, BODY *top, HEADER *hdr, MUTTM menu_redraw (menu); } - if (mutt_query_save_attachment (fp, top, hdr, &directory) == -1) + if (query_save_attachment (fp, top, hdr, &directory) == -1) break; } } @@ -596,7 +596,7 @@ void mutt_save_attachment_list (FILE *fp, int tag, BODY *top, HEADER *hdr, MUTTM } static void -mutt_query_pipe_attachment (char *command, FILE *fp, BODY *body, int filter) +query_pipe_attachment (char *command, FILE *fp, BODY *body, int filter) { char tfile[_POSIX_PATH_MAX]; char warning[STRING+_POSIX_PATH_MAX]; @@ -668,7 +668,7 @@ pipe_attachment_list (char *command, FILE *fp, int tag, BODY *top, int filter, if (!filter && !option (OPTATTACHSPLIT)) pipe_attachment (fp, top, state); else - mutt_query_pipe_attachment (command, fp, top, filter); + query_pipe_attachment (command, fp, top, filter); } else if (top->parts) pipe_attachment_list (command, fp, tag, top->parts, filter, state); @@ -811,7 +811,7 @@ void mutt_print_attachment_list (FILE *fp, int tag, BODY *top) } static void -mutt_update_attach_index (BODY *cur, ATTACHPTR ***idxp, +update_attach_index (BODY *cur, ATTACHPTR ***idxp, short *idxlen, short *idxmax, MUTTMENU *menu) { @@ -879,7 +879,7 @@ mutt_attach_display_loop (MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, mutt_edit_content_type (hdr, idx[menu->current]->content, fp); if (idxmax) { - mutt_update_attach_index (cur, idxp, idxlen, idxmax, menu); + update_attach_index (cur, idxp, idxlen, idxmax, menu); idx = *idxp; } op = OP_VIEW_ATTACH; @@ -1036,7 +1036,7 @@ void mutt_view_attachments (HEADER *hdr) mutt_attach_init (cur); attach_collapse (cur, 0, 1, 0); - mutt_update_attach_index (cur, &idx, &idxlen, &idxmax, menu); + update_attach_index (cur, &idx, &idxlen, &idxmax, menu); while (true) { @@ -1074,7 +1074,7 @@ void mutt_view_attachments (HEADER *hdr) attach_collapse (idx[menu->current]->content, 1, 0, 1); else attach_collapse (idx[menu->current]->content, 0, 1, 1); - mutt_update_attach_index (cur, &idx, &idxlen, &idxmax, menu); + update_attach_index (cur, &idx, &idxlen, &idxmax, menu); break; case OP_FORGET_PASSPHRASE: @@ -1279,7 +1279,7 @@ void mutt_view_attachments (HEADER *hdr) case OP_EDIT_TYPE: mutt_edit_content_type (hdr, idx[menu->current]->content, fp); - mutt_update_attach_index (cur, &idx, &idxlen, &idxmax, menu); + update_attach_index (cur, &idx, &idxlen, &idxmax, menu); break; case OP_EXIT: diff --git a/send.c b/send.c index 239682bad..1c6eb3d39 100644 --- a/send.c +++ b/send.c @@ -74,7 +74,7 @@ static void append_signature (FILE *f) } /* compare two e-mail addresses and return 1 if they are equivalent */ -static int mutt_addrcmp (ADDRESS *a, ADDRESS *b) +static int addrcmp (ADDRESS *a, ADDRESS *b) { if (!a->mailbox || !b->mailbox) return 0; @@ -84,11 +84,11 @@ static int mutt_addrcmp (ADDRESS *a, ADDRESS *b) } /* search an e-mail address in a list */ -static int mutt_addrsrc (ADDRESS *a, ADDRESS *lst) +static int addrsrc (ADDRESS *a, ADDRESS *lst) { for (; lst; lst = lst->next) { - if (mutt_addrcmp (a, lst)) + if (addrcmp (a, lst)) return (1); } return (0); @@ -104,7 +104,7 @@ ADDRESS *mutt_remove_xrefs (ADDRESS *a, ADDRESS *b) { for (p = a; p; p = p->next) { - if (mutt_addrcmp (p, b)) + if (addrcmp (p, b)) break; } if (p) @@ -522,12 +522,12 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto) } else if (env->reply_to) { - if ((mutt_addrcmp (env->from, env->reply_to) && !env->reply_to->next && + if ((addrcmp (env->from, env->reply_to) && !env->reply_to->next && !env->reply_to->personal) || (option (OPTIGNORELISTREPLYTO) && mutt_is_mail_list (env->reply_to) && - (mutt_addrsrc (env->reply_to, env->to) || - mutt_addrsrc (env->reply_to, env->cc)))) + (addrsrc (env->reply_to, env->to) || + addrsrc (env->reply_to, env->cc)))) { /* If the Reply-To: address is a mailing list, assume that it was * put there by the mailing list, and use the From: address @@ -539,7 +539,7 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto) */ rfc822_append (to, env->from, 0); } - else if (!(mutt_addrcmp (env->from, env->reply_to) && + else if (!(addrcmp (env->from, env->reply_to) && !env->reply_to->next) && quadoption (OPT_REPLYTO) != MUTT_YES) { @@ -618,7 +618,7 @@ int mutt_fetch_recips (ENVELOPE *out, ENVELOPE *in, int flags) return 0; } -static LIST *mutt_make_references(ENVELOPE *e) +static LIST *make_references(ENVELOPE *e) { LIST *t = NULL, *l = NULL; @@ -699,7 +699,7 @@ void mutt_add_to_reference_headers (ENVELOPE *env, ENVELOPE *curenv, LIST ***pp, while (*p) p = &(*p)->next; while (*q) q = &(*q)->next; - *p = mutt_make_references (curenv); + *p = make_references (curenv); if (curenv->message_id) { @@ -717,7 +717,7 @@ void mutt_add_to_reference_headers (ENVELOPE *env, ENVELOPE *curenv, LIST ***pp, } static void -mutt_make_reference_headers (ENVELOPE *curenv, ENVELOPE *env, CONTEXT *ctx) +make_reference_headers (ENVELOPE *curenv, ENVELOPE *env, CONTEXT *ctx) { env->references = NULL; env->in_reply_to = NULL; @@ -807,13 +807,13 @@ envelope_defaults (ENVELOPE *env, CONTEXT *ctx, HEADER *cur, int flags) } mutt_make_misc_reply_headers (env, ctx, cur, curenv); - mutt_make_reference_headers (tag ? NULL : curenv, env, ctx); + make_reference_headers (tag ? NULL : curenv, env, ctx); } else if (flags & SENDFORWARD) { mutt_make_forward_subject (env, ctx, cur); if (option (OPTFORWREF)) - mutt_make_reference_headers (tag ? NULL : curenv, env, ctx); + make_reference_headers (tag ? NULL : curenv, env, ctx); } return (0); @@ -1245,8 +1245,8 @@ static int has_recips (ADDRESS *a) return c; } -int -static mutt_search_attach_keyword (char *filename) +static int +mutt_search_attach_keyword (char *filename) { /* Search for the regex in AttachKeyword within a file */ if (!AttachKeyword.rx) diff --git a/sendlib.c b/sendlib.c index 0e1fd1c64..559485843 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1160,7 +1160,7 @@ void mutt_message_to_7bit (BODY *a, FILE *fp) } /* determine which Content-Transfer-Encoding to use */ -static void mutt_set_encoding (BODY *b, CONTENT *info) +static void set_encoding (BODY *b, CONTENT *info) { char send_charset[SHORT_STRING]; @@ -1241,7 +1241,7 @@ void mutt_update_encoding (BODY *a) if ((info = mutt_get_content_info (a->filename, a)) == NULL) return; - mutt_set_encoding (a, info); + set_encoding (a, info); mutt_stamp_attachment(a); FREE (&a->content); @@ -1398,14 +1398,14 @@ static int get_toplevel_encoding (BODY *a) } /* check for duplicate boundary. return 1 if duplicate */ -static int mutt_check_boundary (const char* boundary, BODY *b) +static int check_boundary (const char* boundary, BODY *b) { char* p; - if (b->parts && mutt_check_boundary (boundary, b->parts)) + if (b->parts && check_boundary (boundary, b->parts)) return 1; - if (b->next && mutt_check_boundary (boundary, b->next)) + if (b->next && check_boundary (boundary, b->next)) return 1; if ((p = mutt_get_parameter ("boundary", b->parameter)) @@ -1425,7 +1425,7 @@ BODY *mutt_make_multipart (BODY *b) do { mutt_generate_boundary (&new->parameter); - if (mutt_check_boundary (mutt_get_parameter ("boundary", new->parameter), + if (check_boundary (mutt_get_parameter ("boundary", new->parameter), b)) mutt_delete_parameter ("boundary", &new->parameter); } @@ -2151,7 +2151,7 @@ const char *mutt_fqdn(short may_hide_host) return p; } -static char *mutt_gen_msgid (void) +static char *gen_msgid (void) { char buf[SHORT_STRING]; time_t now; @@ -2556,7 +2556,7 @@ void mutt_prepare_envelope (ENVELOPE *env, int final) mutt_set_followup_to (env); if (!env->message_id) - env->message_id = mutt_gen_msgid (); + env->message_id = gen_msgid (); } /* Take care of 8-bit => 7-bit conversion. */ @@ -2630,7 +2630,7 @@ static int _mutt_bounce_message (FILE *fp, HEADER *h, ADDRESS *to, const char *r fseeko (fp, h->offset, 0); fprintf (f, "Resent-From: %s", resent_from); fprintf (f, "\nResent-%s", mutt_make_date (date, sizeof(date))); - msgid_str = mutt_gen_msgid(); + msgid_str = gen_msgid(); fprintf (f, "Resent-Message-ID: %s\n", msgid_str); fputs ("Resent-To: ", f); mutt_write_address_list (to, f, 11, 0); diff --git a/smime.c b/smime.c index 6c6e1147a..d6096da7c 100644 --- a/smime.c +++ b/smime.c @@ -295,12 +295,12 @@ static const char *_mutt_fmt_smime_command (char *dest, -static void mutt_smime_command (char *d, size_t dlen, +static void smime_command (char *d, size_t dlen, struct smime_command_context *cctx, const char *fmt) { mutt_FormatString (d, dlen, 0, MuttIndexWindow->cols, NONULL(fmt), _mutt_fmt_smime_command, (unsigned long) cctx, 0); - mutt_debug (2, "mutt_smime_command: %s\n", d); + mutt_debug (2, "smime_command: %s\n", d); } @@ -333,7 +333,7 @@ static pid_t smime_invoke (FILE **smimein, FILE **smimeout, FILE **smimeerr, cctx.certificates = certificates; cctx.intermediates = intermediates; - mutt_smime_command (cmd, sizeof (cmd), &cctx, format); + smime_command (cmd, sizeof (cmd), &cctx, format); return mutt_create_filter_fd (cmd, smimein, smimeout, smimeerr, smimeinfd, smimeoutfd, smimeerrfd); diff --git a/thread.c b/thread.c index 4e67a88e1..3c18c8a7b 100644 --- a/thread.c +++ b/thread.c @@ -484,7 +484,7 @@ static void insert_message (THREAD **new, THREAD *newparent, THREAD *cur) *new = cur; } -static HASH *mutt_make_subj_hash (CONTEXT *ctx) +static HASH *make_subj_hash (CONTEXT *ctx) { int i; HEADER *hdr; @@ -509,7 +509,7 @@ static void pseudo_threads (CONTEXT *ctx) THREAD *tmp, *cur, *parent, *curchild, *nextchild; if (!ctx->subj_hash) - ctx->subj_hash = mutt_make_subj_hash (ctx); + ctx->subj_hash = make_subj_hash (ctx); while (tree) {