From 2b66c2cc088893a5d57c0fa546038fcd2ee3a01d Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sun, 31 Dec 2017 12:05:13 +0000 Subject: [PATCH] rename functions: adr -> addr --- copy.c | 2 +- group.c | 12 ++++++------ group.h | 4 ++-- init.c | 6 +++--- mutt/mapping.c | 2 +- parse.c | 18 +++++++++--------- pattern.c | 22 +++++++++++----------- rfc2047.c | 4 ++-- rfc2047.h | 4 ++-- sendlib.c | 26 +++++++++++++------------- url.c | 16 ++++++++-------- 11 files changed, 58 insertions(+), 58 deletions(-) diff --git a/copy.c b/copy.c index 5371f33d984..e85a27307ed 100644 --- a/copy.c +++ b/copy.c @@ -1027,7 +1027,7 @@ static int address_header_decode(char **h) return 0; mutt_addrlist_to_local(a); - rfc2047_decode_adrlist(a); + rfc2047_decode_addrlist(a); for (cur = a; cur; cur = cur->next) if (cur->personal) mutt_str_dequote_comment(cur->personal); diff --git a/group.c b/group.c index 361822b3def..b4783ff7e0b 100644 --- a/group.c +++ b/group.c @@ -101,7 +101,7 @@ void mutt_group_context_destroy(struct GroupContext **ctx) } } -static void group_add_adrlist(struct Group *g, struct Address *a) +static void group_add_addrlist(struct Group *g, struct Address *a) { struct Address **p = NULL, *q = NULL; @@ -118,7 +118,7 @@ static void group_add_adrlist(struct Group *g, struct Address *a) *p = q; } -static int group_remove_adrlist(struct Group *g, struct Address *a) +static int group_remove_addrlist(struct Group *g, struct Address *a) { struct Address *p = NULL; @@ -143,19 +143,19 @@ static int group_remove_regex(struct Group *g, const char *s) return mutt_regexlist_remove(&g->rs, s); } -void mutt_group_context_add_adrlist(struct GroupContext *ctx, struct Address *a) +void mutt_group_context_add_addrlist(struct GroupContext *ctx, struct Address *a) { for (; ctx; ctx = ctx->next) - group_add_adrlist(ctx->g, a); + group_add_addrlist(ctx->g, a); } -int mutt_group_context_remove_adrlist(struct GroupContext *ctx, struct Address *a) +int mutt_group_context_remove_addrlist(struct GroupContext *ctx, struct Address *a) { int rc = 0; for (; (!rc) && ctx; ctx = ctx->next) { - rc = group_remove_adrlist(ctx->g, a); + rc = group_remove_addrlist(ctx->g, a); if (empty_group(ctx->g)) group_remove(ctx->g); } diff --git a/group.h b/group.h index ca325a011e7..caeb62bb694 100644 --- a/group.h +++ b/group.h @@ -53,14 +53,14 @@ struct GroupContext void mutt_group_context_add(struct GroupContext **ctx, struct Group *group); void mutt_group_context_destroy(struct GroupContext **ctx); -void mutt_group_context_add_adrlist(struct GroupContext *ctx, struct Address *a); +void mutt_group_context_add_addrlist(struct GroupContext *ctx, struct Address *a); int mutt_group_context_add_regex(struct GroupContext *ctx, const char *s, int flags, struct Buffer *err); bool mutt_group_match(struct Group *g, const char *s); int mutt_group_context_clear(struct GroupContext **ctx); int mutt_group_context_remove_regex(struct GroupContext *ctx, const char *s); -int mutt_group_context_remove_adrlist(struct GroupContext *ctx, struct Address *a); +int mutt_group_context_remove_addrlist(struct GroupContext *ctx, struct Address *a); struct Group *mutt_pattern_group(const char *k); diff --git a/init.c b/init.c index 0308d8cf49e..7f365864fa7 100644 --- a/init.c +++ b/init.c @@ -1355,9 +1355,9 @@ static int parse_group(struct Buffer *buf, struct Buffer *s, unsigned long data, goto bail; } if (data == MUTT_GROUP) - mutt_group_context_add_adrlist(gc, addr); + mutt_group_context_add_addrlist(gc, addr); else if (data == MUTT_UNGROUP) - mutt_group_context_remove_adrlist(gc, addr); + mutt_group_context_remove_addrlist(gc, addr); mutt_addr_free(&addr); break; } @@ -1800,7 +1800,7 @@ static int parse_alias(struct Buffer *buf, struct Buffer *s, unsigned long data, goto bail; } - mutt_group_context_add_adrlist(gc, tmp->addr); + mutt_group_context_add_addrlist(gc, tmp->addr); mutt_alias_add_reverse(tmp); if (debuglevel >= 2) diff --git a/mutt/mapping.c b/mutt/mapping.c index 98821df8a62..5085755305d 100644 --- a/mutt/mapping.c +++ b/mutt/mapping.c @@ -32,8 +32,8 @@ * | mutt_map_get_value() | Lookup the constant for a string */ -#include "mapping.h" #include +#include "mapping.h" #include "string2.h" /** diff --git a/parse.c b/parse.c index bf1c7f8576c..b34f7a5df85 100644 --- a/parse.c +++ b/parse.c @@ -1266,15 +1266,15 @@ struct Envelope *mutt_read_rfc822_header(FILE *f, struct Header *hdr, hdr->content->offset = ftello(f); /* do RFC2047 decoding */ - rfc2047_decode_adrlist(e->from); - rfc2047_decode_adrlist(e->to); - rfc2047_decode_adrlist(e->cc); - rfc2047_decode_adrlist(e->bcc); - rfc2047_decode_adrlist(e->reply_to); - rfc2047_decode_adrlist(e->mail_followup_to); - rfc2047_decode_adrlist(e->return_path); - rfc2047_decode_adrlist(e->sender); - rfc2047_decode_adrlist(e->x_original_to); + rfc2047_decode_addrlist(e->from); + rfc2047_decode_addrlist(e->to); + rfc2047_decode_addrlist(e->cc); + rfc2047_decode_addrlist(e->bcc); + rfc2047_decode_addrlist(e->reply_to); + rfc2047_decode_addrlist(e->mail_followup_to); + rfc2047_decode_addrlist(e->return_path); + rfc2047_decode_addrlist(e->sender); + rfc2047_decode_addrlist(e->x_original_to); if (e->subject) { diff --git a/pattern.c b/pattern.c index d34fbb7cd10..f8ea2530acf 100644 --- a/pattern.c +++ b/pattern.c @@ -1354,7 +1354,7 @@ static int perform_or(struct Pattern *pat, enum PatternExecFlag flags, return false; } -static int match_adrlist(struct Pattern *pat, int match_personal, int n, ...) +static int match_addrlist(struct Pattern *pat, int match_personal, int n, ...) { va_list ap; @@ -1596,23 +1596,23 @@ int mutt_pattern_exec(struct Pattern *pat, enum PatternExecFlag flags, case MUTT_SENDER: if (!h->env) return 0; - return (pat->not ^ match_adrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, - h->env->sender)); + return (pat->not ^ match_addrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, + h->env->sender)); case MUTT_FROM: if (!h->env) return 0; return (pat->not ^ - match_adrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, h->env->from)); + match_addrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, h->env->from)); case MUTT_TO: if (!h->env) return 0; return (pat->not ^ - match_adrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, h->env->to)); + match_addrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, h->env->to)); case MUTT_CC: if (!h->env) return 0; return (pat->not ^ - match_adrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, h->env->cc)); + match_addrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, h->env->cc)); case MUTT_SUBJECT: if (!h->env) return 0; @@ -1635,14 +1635,14 @@ int mutt_pattern_exec(struct Pattern *pat, enum PatternExecFlag flags, case MUTT_ADDRESS: if (!h->env) return 0; - return (pat->not ^ match_adrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 4, - h->env->from, h->env->sender, h->env->to, - h->env->cc)); + return (pat->not ^ match_addrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 4, + h->env->from, h->env->sender, + h->env->to, h->env->cc)); case MUTT_RECIPIENT: if (!h->env) return 0; - return (pat->not ^ match_adrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 2, - h->env->to, h->env->cc)); + return (pat->not ^ match_addrlist(pat, flags & MUTT_MATCH_FULL_ADDRESS, 2, + h->env->to, h->env->cc)); case MUTT_LIST: /* known list, subscribed or not */ if (!h->env) return 0; diff --git a/rfc2047.c b/rfc2047.c index 5c6f15d164d..6d76602cf23 100644 --- a/rfc2047.c +++ b/rfc2047.c @@ -633,7 +633,7 @@ void rfc2047_encode_string(char **pd, int encode_specials, int col) *pd = e; } -void rfc2047_encode_adrlist(struct Address *addr, const char *tag) +void rfc2047_encode_addrlist(struct Address *addr, const char *tag) { struct Address *ptr = addr; int col = tag ? strlen(tag) + 2 : 32; @@ -906,7 +906,7 @@ void rfc2047_decode(char **pd) mutt_str_adjust(pd); } -void rfc2047_decode_adrlist(struct Address *a) +void rfc2047_decode_addrlist(struct Address *a) { while (a) { diff --git a/rfc2047.h b/rfc2047.h index 5b5cf076a32..e029e550320 100644 --- a/rfc2047.h +++ b/rfc2047.h @@ -32,11 +32,11 @@ char *mutt_choose_charset(const char *fromcode, const char *charsets, char *u, int convert_nonmime_string(char **ps); void rfc2047_encode_string(char **pd, int encode_specials, int col); -void rfc2047_encode_adrlist(struct Address *addr, const char *tag); +void rfc2047_encode_addrlist(struct Address *addr, const char *tag); #define rfc2047_encode_string32(a) rfc2047_encode_string(a, 0, 32); void rfc2047_decode(char **pd); -void rfc2047_decode_adrlist(struct Address *a); +void rfc2047_decode_addrlist(struct Address *a); #endif /* _MUTT_RFC2047_H */ diff --git a/sendlib.c b/sendlib.c index 88a0745cf6c..9bb56ad4888 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2677,12 +2677,12 @@ void mutt_prepare_envelope(struct Envelope *env, int final) } /* Take care of 8-bit => 7-bit conversion. */ - rfc2047_encode_adrlist(env->to, "To"); - rfc2047_encode_adrlist(env->cc, "Cc"); - rfc2047_encode_adrlist(env->bcc, "Bcc"); - rfc2047_encode_adrlist(env->from, "From"); - rfc2047_encode_adrlist(env->mail_followup_to, "Mail-Followup-To"); - rfc2047_encode_adrlist(env->reply_to, "Reply-To"); + rfc2047_encode_addrlist(env->to, "To"); + rfc2047_encode_addrlist(env->cc, "Cc"); + rfc2047_encode_addrlist(env->bcc, "Bcc"); + rfc2047_encode_addrlist(env->from, "From"); + rfc2047_encode_addrlist(env->mail_followup_to, "Mail-Followup-To"); + rfc2047_encode_addrlist(env->reply_to, "Reply-To"); if (env->subject) #ifdef USE_NNTP @@ -2705,11 +2705,11 @@ void mutt_unprepare_envelope(struct Envelope *env) mutt_addr_free(&env->mail_followup_to); /* back conversions */ - rfc2047_decode_adrlist(env->to); - rfc2047_decode_adrlist(env->cc); - rfc2047_decode_adrlist(env->bcc); - rfc2047_decode_adrlist(env->from); - rfc2047_decode_adrlist(env->reply_to); + rfc2047_decode_addrlist(env->to); + rfc2047_decode_addrlist(env->cc); + rfc2047_decode_addrlist(env->bcc); + rfc2047_decode_addrlist(env->from); + rfc2047_decode_addrlist(env->reply_to); rfc2047_decode(&env->subject); } @@ -2803,7 +2803,7 @@ int mutt_bounce_message(FILE *fp, struct Header *h, struct Address *to) if (fqdn) mutt_addr_qualify(from, fqdn); - rfc2047_encode_adrlist(from, "Resent-From"); + rfc2047_encode_addrlist(from, "Resent-From"); if (mutt_addrlist_to_intl(from, &err)) { mutt_error(_("Bad IDN %s while preparing resent-from."), err); @@ -2822,7 +2822,7 @@ int mutt_bounce_message(FILE *fp, struct Header *h, struct Address *to) * list being bounced to. */ resent_to = mutt_addr_copy_list(to, false); - rfc2047_encode_adrlist(resent_to, "Resent-To"); + rfc2047_encode_addrlist(resent_to, "Resent-To"); ret = bounce_message(fp, h, resent_to, resent_from, from); diff --git a/url.c b/url.c index 3487f8c441e..d97daa7a3d2 100644 --- a/url.c +++ b/url.c @@ -421,14 +421,14 @@ int url_parse_mailto(struct Envelope *e, char **body, const char *src) } /* RFC2047 decode after the RFC822 parsing */ - rfc2047_decode_adrlist(e->from); - rfc2047_decode_adrlist(e->to); - rfc2047_decode_adrlist(e->cc); - rfc2047_decode_adrlist(e->bcc); - rfc2047_decode_adrlist(e->reply_to); - rfc2047_decode_adrlist(e->mail_followup_to); - rfc2047_decode_adrlist(e->return_path); - rfc2047_decode_adrlist(e->sender); + rfc2047_decode_addrlist(e->from); + rfc2047_decode_addrlist(e->to); + rfc2047_decode_addrlist(e->cc); + rfc2047_decode_addrlist(e->bcc); + rfc2047_decode_addrlist(e->reply_to); + rfc2047_decode_addrlist(e->mail_followup_to); + rfc2047_decode_addrlist(e->return_path); + rfc2047_decode_addrlist(e->sender); rfc2047_decode(&e->x_label); rfc2047_decode(&e->subject);