From d3ec5a64c299a9b44ed87fd387a53d952bb9e4ce Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sun, 31 Dec 2017 12:12:36 +0000 Subject: [PATCH] rename params/args/vars: adr -> addr --- addrbook.c | 8 +++---- alias.c | 38 ++++++++++++++++---------------- alias.h | 2 +- commands.c | 28 +++++++++++------------ hdrline.c | 20 ++++++++--------- hook.c | 26 +++++++++++----------- ncrypt/crypt.c | 22 +++++++++--------- ncrypt/crypt_gpgme.c | 12 +++++----- ncrypt/crypt_gpgme.h | 4 ++-- ncrypt/crypt_mod.h | 2 +- ncrypt/crypt_mod_pgp_classic.c | 4 ++-- ncrypt/crypt_mod_pgp_gpgme.c | 4 ++-- ncrypt/crypt_mod_smime_classic.c | 4 ++-- ncrypt/crypt_mod_smime_gpgme.c | 4 ++-- ncrypt/cryptglue.c | 8 +++---- ncrypt/cryptglue.h | 4 ++-- ncrypt/pgp.c | 4 ++-- ncrypt/pgp.h | 2 +- ncrypt/smime.c | 4 ++-- ncrypt/smime.h | 2 +- protos.h | 4 ++-- recvcmd.c | 22 +++++++++--------- send.c | 16 +++++++------- sendlib.c | 18 +++++++-------- 24 files changed, 131 insertions(+), 131 deletions(-) diff --git a/addrbook.c b/addrbook.c index 163d43a2ed3..b97799d4a91 100644 --- a/addrbook.c +++ b/addrbook.c @@ -76,7 +76,7 @@ static const char *alias_format_str(char *buf, size_t buflen, size_t col, int co const char *if_str, const char *else_str, unsigned long data, enum FormatFlag flags) { - char fmt[SHORT_STRING], adr[SHORT_STRING]; + char fmt[SHORT_STRING], addr[SHORT_STRING]; struct Alias *alias = (struct Alias *) data; switch (op) @@ -93,10 +93,10 @@ static const char *alias_format_str(char *buf, size_t buflen, size_t col, int co snprintf(buf, buflen, fmt, alias->num + 1); break; case 'r': - adr[0] = '\0'; - mutt_addr_write(adr, sizeof(adr), alias->addr, true); + addr[0] = '\0'; + mutt_addr_write(addr, sizeof(addr), alias->addr, true); snprintf(fmt, sizeof(fmt), "%%%ss", prec); - snprintf(buf, buflen, fmt, adr); + snprintf(buf, buflen, fmt, addr); break; case 't': buf[0] = alias->tagged ? '*' : ' '; diff --git a/alias.c b/alias.c index cd90b24a88e..00ef08ac276 100644 --- a/alias.c +++ b/alias.c @@ -186,7 +186,7 @@ static void write_safe_address(FILE *fp, char *s) struct Address *mutt_get_address(struct Envelope *env, char **pfxp) { - struct Address *adr = NULL; + struct Address *addr = NULL; char *pfx = NULL; if (mutt_addr_is_user(env->from)) @@ -194,29 +194,29 @@ struct Address *mutt_get_address(struct Envelope *env, char **pfxp) if (env->to && !mutt_is_mail_list(env->to)) { pfx = "To"; - adr = env->to; + addr = env->to; } else { pfx = "Cc"; - adr = env->cc; + addr = env->cc; } } else if (env->reply_to && !mutt_is_mail_list(env->reply_to)) { pfx = "Reply-To"; - adr = env->reply_to; + addr = env->reply_to; } else { - adr = env->from; + addr = env->from; pfx = "From"; } if (pfxp) *pfxp = pfx; - return adr; + return addr; } static void recode_buf(char *buf, size_t buflen) @@ -279,27 +279,27 @@ int check_alias_name(const char *s, char *dest, size_t destlen) return rc; } -void mutt_create_alias(struct Envelope *cur, struct Address *iadr) +void mutt_create_alias(struct Envelope *cur, struct Address *iaddr) { struct Alias *new = NULL, *t = NULL; char buf[LONG_STRING], tmp[LONG_STRING], prompt[SHORT_STRING], *pc = NULL; char *err = NULL; char fixed[LONG_STRING]; FILE *rc = NULL; - struct Address *adr = NULL; + struct Address *addr = NULL; if (cur) { - adr = mutt_get_address(cur, NULL); + addr = mutt_get_address(cur, NULL); } - else if (iadr) + else if (iaddr) { - adr = iadr; + addr = iaddr; } - if (adr && adr->mailbox) + if (addr && addr->mailbox) { - mutt_str_strfcpy(tmp, adr->mailbox, sizeof(tmp)); + mutt_str_strfcpy(tmp, addr->mailbox, sizeof(tmp)); pc = strchr(tmp, '@'); if (pc) *pc = '\0'; @@ -337,14 +337,14 @@ void mutt_create_alias(struct Envelope *cur, struct Address *iadr) new = mutt_mem_calloc(1, sizeof(struct Alias)); new->name = mutt_str_strdup(buf); - mutt_addrlist_to_local(adr); + mutt_addrlist_to_local(addr); - if (adr && adr->mailbox) - mutt_str_strfcpy(buf, adr->mailbox, sizeof(buf)); + if (addr && addr->mailbox) + mutt_str_strfcpy(buf, addr->mailbox, sizeof(buf)); else buf[0] = '\0'; - mutt_addrlist_to_intl(adr, NULL); + mutt_addrlist_to_intl(addr, NULL); do { @@ -365,8 +365,8 @@ void mutt_create_alias(struct Envelope *cur, struct Address *iadr) } } while (!new->addr); - if (adr && adr->personal && !mutt_is_mail_list(adr)) - mutt_str_strfcpy(buf, adr->personal, sizeof(buf)); + if (addr && addr->personal && !mutt_is_mail_list(addr)) + mutt_str_strfcpy(buf, addr->personal, sizeof(buf)); else buf[0] = '\0'; diff --git a/alias.h b/alias.h index 20f0ee7e051..2732d6941cf 100644 --- a/alias.h +++ b/alias.h @@ -45,7 +45,7 @@ struct Address *mutt_lookup_alias(const char *s); struct Address *mutt_expand_aliases(struct Address *a); void mutt_expand_aliases_env(struct Envelope *env); struct Address *mutt_get_address(struct Envelope *env, char **pfxp); -void mutt_create_alias(struct Envelope *cur, struct Address *iadr); +void mutt_create_alias(struct Envelope *cur, struct Address *iaddr); void mutt_free_alias(struct Alias **p); #endif /* _MUTT_ALIAS_H */ diff --git a/commands.c b/commands.c index 86521726271..b01d92c021a 100644 --- a/commands.c +++ b/commands.c @@ -262,7 +262,7 @@ void ci_bounce_message(struct Header *h) char prompt[SHORT_STRING]; char scratch[SHORT_STRING]; char buf[HUGE_STRING] = { 0 }; - struct Address *adr = NULL; + struct Address *addr = NULL; char *err = NULL; int rc; @@ -298,25 +298,25 @@ void ci_bounce_message(struct Header *h) if (rc || !buf[0]) return; - adr = mutt_addr_parse_list2(adr, buf); - if (!adr) + addr = mutt_addr_parse_list2(addr, buf); + if (!addr) { mutt_error(_("Error parsing address!")); return; } - adr = mutt_expand_aliases(adr); + addr = mutt_expand_aliases(addr); - if (mutt_addrlist_to_intl(adr, &err) < 0) + if (mutt_addrlist_to_intl(addr, &err) < 0) { mutt_error(_("Bad IDN: '%s'"), err); FREE(&err); - mutt_addr_free(&adr); + mutt_addr_free(&addr); return; } buf[0] = '\0'; - mutt_addr_write(buf, sizeof(buf), adr, true); + mutt_addr_write(buf, sizeof(buf), addr, true); #define EXTRA_SPACE (15 + 7 + 2) snprintf(scratch, sizeof(scratch), @@ -333,7 +333,7 @@ void ci_bounce_message(struct Header *h) if (query_quadoption(Bounce, prompt) != MUTT_YES) { - mutt_addr_free(&adr); + mutt_addr_free(&addr); mutt_window_clearline(MuttMessageWindow, 0); mutt_message(h ? _("Message not bounced.") : _("Messages not bounced.")); return; @@ -341,8 +341,8 @@ void ci_bounce_message(struct Header *h) mutt_window_clearline(MuttMessageWindow, 0); - rc = mutt_bounce_message(NULL, h, adr); - mutt_addr_free(&adr); + rc = mutt_bounce_message(NULL, h, addr); + mutt_addr_free(&addr); /* If no error, or background, display message. */ if ((rc == 0) || (rc == S_BKG)) mutt_message(h ? _("Message bounced.") : _("Messages bounced.")); @@ -669,11 +669,11 @@ void mutt_display_address(struct Envelope *env) { char *pfx = NULL; char buf[SHORT_STRING]; - struct Address *adr = NULL; + struct Address *addr = NULL; - adr = mutt_get_address(env, &pfx); + addr = mutt_get_address(env, &pfx); - if (!adr) + if (!addr) return; /* @@ -684,7 +684,7 @@ void mutt_display_address(struct Envelope *env) */ buf[0] = '\0'; - mutt_addr_write(buf, sizeof(buf), adr, false); + mutt_addr_write(buf, sizeof(buf), addr, false); mutt_message("%s: %s", pfx, buf); } diff --git a/hdrline.c b/hdrline.c index cdb8c71b500..70e03095863 100644 --- a/hdrline.c +++ b/hdrline.c @@ -88,24 +88,24 @@ bool mutt_is_subscribed_list(struct Address *addr) /** * check_for_mailing_list - Search list of addresses for a mailing list - * @param adr List of addreses to search + * @param addr List of addreses to search * @param pfx Prefix string * @param buf Buffer to store results * @param buflen Buffer length * @retval 1 Mailing list found * @retval 0 No list found * - * Search for a mailing list in the list of addresses pointed to by adr. + * Search for a mailing list in the list of addresses pointed to by addr. * If one is found, print pfx and the name of the list into buf. */ -static bool check_for_mailing_list(struct Address *adr, const char *pfx, char *buf, int buflen) +static bool check_for_mailing_list(struct Address *addr, const char *pfx, char *buf, int buflen) { - for (; adr; adr = adr->next) + for (; addr; addr = addr->next) { - if (mutt_is_subscribed_list(adr)) + if (mutt_is_subscribed_list(addr)) { if (pfx && buf && buflen) - snprintf(buf, buflen, "%s%s", pfx, mutt_get_name(adr)); + snprintf(buf, buflen, "%s%s", pfx, mutt_get_name(addr)); return true; } } @@ -118,14 +118,14 @@ static bool check_for_mailing_list(struct Address *adr, const char *pfx, char *b * If one is found, print the address of the list into buf, then return 1. * Otherwise, simply return 0. */ -static bool check_for_mailing_list_addr(struct Address *adr, char *buf, int buflen) +static bool check_for_mailing_list_addr(struct Address *addr, char *buf, int buflen) { - for (; adr; adr = adr->next) + for (; addr; addr = addr->next) { - if (mutt_is_subscribed_list(adr)) + if (mutt_is_subscribed_list(addr)) { if (buf && buflen) - snprintf(buf, buflen, "%s", adr->mailbox); + snprintf(buf, buflen, "%s", addr->mailbox); return true; } } diff --git a/hook.c b/hook.c index 57ef1c1fc69..c84ed402206 100644 --- a/hook.c +++ b/hook.c @@ -477,23 +477,23 @@ void mutt_default_save(char *path, size_t pathlen, struct Header *hdr) if (addr_hook(path, pathlen, MUTT_SAVEHOOK, Context, hdr) != 0) { char tmp[_POSIX_PATH_MAX]; - struct Address *adr = NULL; + struct Address *addr = NULL; struct Envelope *env = hdr->env; bool from_me = mutt_addr_is_user(env->from); if (!from_me && env->reply_to && env->reply_to->mailbox) - adr = env->reply_to; + addr = env->reply_to; else if (!from_me && env->from && env->from->mailbox) - adr = env->from; + addr = env->from; else if (env->to && env->to->mailbox) - adr = env->to; + addr = env->to; else if (env->cc && env->cc->mailbox) - adr = env->cc; + addr = env->cc; else - adr = NULL; - if (adr) + addr = NULL; + if (addr) { - mutt_safe_path(tmp, sizeof(tmp), adr); + mutt_safe_path(tmp, sizeof(tmp), addr); snprintf(path, pathlen, "=%s", tmp); } } @@ -501,7 +501,7 @@ void mutt_default_save(char *path, size_t pathlen, struct Header *hdr) void mutt_select_fcc(char *path, size_t pathlen, struct Header *hdr) { - struct Address *adr = NULL; + struct Address *addr = NULL; char buf[_POSIX_PATH_MAX]; struct Envelope *env = hdr->env; @@ -509,8 +509,8 @@ void mutt_select_fcc(char *path, size_t pathlen, struct Header *hdr) { if ((SaveName || ForceName) && (env->to || env->cc || env->bcc)) { - adr = env->to ? env->to : (env->cc ? env->cc : env->bcc); - mutt_safe_path(buf, sizeof(buf), adr); + addr = env->to ? env->to : (env->cc ? env->cc : env->bcc); + mutt_safe_path(buf, sizeof(buf), addr); mutt_file_concat_path(path, NONULL(Folder), buf, pathlen); if (!ForceName && mx_access(path, W_OK) != 0) mutt_str_strfcpy(path, NONULL(Record), pathlen); @@ -533,9 +533,9 @@ static void list_hook(struct ListHead *matches, const char *match, int hook) } } -void mutt_crypt_hook(struct ListHead *list, struct Address *adr) +void mutt_crypt_hook(struct ListHead *list, struct Address *addr) { - list_hook(list, adr->mailbox, MUTT_CRYPTHOOK); + list_hook(list, addr->mailbox, MUTT_CRYPTHOOK); } #ifdef USE_SOCKET diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index 26389a55bf1..1828fac0323 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -837,7 +837,7 @@ void crypt_extract_keys_from_messages(struct Header *h) */ int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode) { - struct Address *adrlist = NULL, *last = NULL; + struct Address *addrlist = NULL, *last = NULL; const char *fqdn = mutt_fqdn(1); char *self_encrypt = NULL; size_t keylist_size; @@ -852,13 +852,13 @@ int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode) if ((WithCrypto & APPLICATION_PGP)) OPT_PGP_CHECK_TRUST = true; - last = mutt_addr_append(&adrlist, msg->env->to, false); - last = mutt_addr_append(last ? &last : &adrlist, msg->env->cc, false); - mutt_addr_append(last ? &last : &adrlist, msg->env->bcc, false); + last = mutt_addr_append(&addrlist, msg->env->to, false); + last = mutt_addr_append(last ? &last : &addrlist, msg->env->cc, false); + mutt_addr_append(last ? &last : &addrlist, msg->env->bcc, false); if (fqdn) - mutt_addr_qualify(adrlist, fqdn); - adrlist = mutt_remove_duplicates(adrlist); + mutt_addr_qualify(addrlist, fqdn); + addrlist = mutt_remove_duplicates(addrlist); *keylist = NULL; @@ -866,10 +866,10 @@ int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode) { if ((WithCrypto & APPLICATION_PGP) && (msg->security & APPLICATION_PGP)) { - *keylist = crypt_pgp_findkeys(adrlist, oppenc_mode); + *keylist = crypt_pgp_findkeys(addrlist, oppenc_mode); if (!*keylist) { - mutt_addr_free(&adrlist); + mutt_addr_free(&addrlist); return -1; } OPT_PGP_CHECK_TRUST = false; @@ -878,10 +878,10 @@ int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode) } if ((WithCrypto & APPLICATION_SMIME) && (msg->security & APPLICATION_SMIME)) { - *keylist = crypt_smime_findkeys(adrlist, oppenc_mode); + *keylist = crypt_smime_findkeys(addrlist, oppenc_mode); if (!*keylist) { - mutt_addr_free(&adrlist); + mutt_addr_free(&addrlist); return -1; } if (SmimeSelfEncrypt || (SmimeEncryptSelf == MUTT_YES)) @@ -896,7 +896,7 @@ int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode) sprintf(*keylist + keylist_size, " %s", self_encrypt); } - mutt_addr_free(&adrlist); + mutt_addr_free(&addrlist); return 0; } diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 937b96c2b78..2c4d2ab018d 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -4635,7 +4635,7 @@ static struct CryptKeyInfo *crypt_ask_for_key(char *tag, char *whatfor, short ab * If oppenc_mode is true, only keys that can be determined without prompting * will be used. */ -static char *find_keys(struct Address *adrlist, unsigned int app, int oppenc_mode) +static char *find_keys(struct Address *addrlist, unsigned int app, int oppenc_mode) { struct ListHead crypt_hook_list = STAILQ_HEAD_INITIALIZER(crypt_hook_list); struct ListNode *crypt_hook = NULL; @@ -4653,7 +4653,7 @@ static char *find_keys(struct Address *adrlist, unsigned int app, int oppenc_mod int r; bool key_selected; - for (p = adrlist; p; p = p->next) + for (p = addrlist; p; p = p->next) { key_selected = false; mutt_crypt_hook(&crypt_hook_list, p); @@ -4758,14 +4758,14 @@ static char *find_keys(struct Address *adrlist, unsigned int app, int oppenc_mod return keylist; } -char *pgp_gpgme_findkeys(struct Address *adrlist, int oppenc_mode) +char *pgp_gpgme_findkeys(struct Address *addrlist, int oppenc_mode) { - return find_keys(adrlist, APPLICATION_PGP, oppenc_mode); + return find_keys(addrlist, APPLICATION_PGP, oppenc_mode); } -char *smime_gpgme_findkeys(struct Address *adrlist, int oppenc_mode) +char *smime_gpgme_findkeys(struct Address *addrlist, int oppenc_mode) { - return find_keys(adrlist, APPLICATION_SMIME, oppenc_mode); + return find_keys(addrlist, APPLICATION_SMIME, oppenc_mode); } #ifdef HAVE_GPGME_OP_EXPORT_KEYS diff --git a/ncrypt/crypt_gpgme.h b/ncrypt/crypt_gpgme.h index 3b5c32296d2..e79eabe6b1d 100644 --- a/ncrypt/crypt_gpgme.h +++ b/ncrypt/crypt_gpgme.h @@ -33,8 +33,8 @@ struct State; void pgp_gpgme_init(void); void smime_gpgme_init(void); -char *pgp_gpgme_findkeys(struct Address *adrlist, int oppenc_mode); -char *smime_gpgme_findkeys(struct Address *adrlist, int oppenc_mode); +char *pgp_gpgme_findkeys(struct Address *addrlist, int oppenc_mode); +char *smime_gpgme_findkeys(struct Address *addrlist, int oppenc_mode); struct Body *pgp_gpgme_encrypt_message(struct Body *a, char *keylist, int sign); struct Body *smime_gpgme_build_smime_entity(struct Body *a, char *keylist); diff --git a/ncrypt/crypt_mod.h b/ncrypt/crypt_mod.h index 1f4dfc84798..6c4c1406ed9 100644 --- a/ncrypt/crypt_mod.h +++ b/ncrypt/crypt_mod.h @@ -47,7 +47,7 @@ typedef void (*crypt_func_pgp_invoke_getkeys_t)(struct Address *addr); typedef int (*crypt_func_pgp_check_traditional_t) (FILE *fp, struct Body *b, int just_one); typedef struct Body *(*crypt_func_pgp_traditional_encryptsign_t)(struct Body *a, int flags, char *keylist); typedef struct Body *(*crypt_func_pgp_make_key_attachment_t)(char *tempf); -typedef char *(*crypt_func_findkeys_t)(struct Address *adrlist, int oppenc_mode); +typedef char *(*crypt_func_findkeys_t)(struct Address *addrlist, int oppenc_mode); typedef struct Body *(*crypt_func_sign_message_t)(struct Body *a); typedef struct Body *(*crypt_func_pgp_encrypt_message_t)(struct Body *a, char *keylist, int sign); typedef void (*crypt_func_pgp_invoke_import_t)(const char *fname); diff --git a/ncrypt/crypt_mod_pgp_classic.c b/ncrypt/crypt_mod_pgp_classic.c index 0ff1cee1e43..595908b985c 100644 --- a/ncrypt/crypt_mod_pgp_classic.c +++ b/ncrypt/crypt_mod_pgp_classic.c @@ -57,9 +57,9 @@ static int crypt_mod_pgp_application_handler(struct Body *m, struct State *s) return pgp_application_pgp_handler(m, s); } -static char *crypt_mod_pgp_findkeys(struct Address *adrlist, int oppenc_mode) +static char *crypt_mod_pgp_findkeys(struct Address *addrlist, int oppenc_mode) { - return pgp_find_keys(adrlist, oppenc_mode); + return pgp_find_keys(addrlist, oppenc_mode); } static struct Body *crypt_mod_pgp_sign_message(struct Body *a) diff --git a/ncrypt/crypt_mod_pgp_gpgme.c b/ncrypt/crypt_mod_pgp_gpgme.c index 0045747e650..e1f827cb572 100644 --- a/ncrypt/crypt_mod_pgp_gpgme.c +++ b/ncrypt/crypt_mod_pgp_gpgme.c @@ -76,9 +76,9 @@ static void crypt_mod_pgp_invoke_import(const char *fname) pgp_gpgme_invoke_import(fname); } -static char *crypt_mod_pgp_findkeys(struct Address *adrlist, int oppenc_mode) +static char *crypt_mod_pgp_findkeys(struct Address *addrlist, int oppenc_mode) { - return pgp_gpgme_findkeys(adrlist, oppenc_mode); + return pgp_gpgme_findkeys(addrlist, oppenc_mode); } static struct Body *crypt_mod_pgp_sign_message(struct Body *a) diff --git a/ncrypt/crypt_mod_smime_classic.c b/ncrypt/crypt_mod_smime_classic.c index c4275d1e3ec..5ac34c32944 100644 --- a/ncrypt/crypt_mod_smime_classic.c +++ b/ncrypt/crypt_mod_smime_classic.c @@ -56,9 +56,9 @@ static int crypt_mod_smime_application_handler(struct Body *m, struct State *s) return smime_application_smime_handler(m, s); } -static char *crypt_mod_smime_findkeys(struct Address *adrlist, int oppenc_mode) +static char *crypt_mod_smime_findkeys(struct Address *addrlist, int oppenc_mode) { - return smime_find_keys(adrlist, oppenc_mode); + return smime_find_keys(addrlist, oppenc_mode); } static struct Body *crypt_mod_smime_sign_message(struct Body *a) diff --git a/ncrypt/crypt_mod_smime_gpgme.c b/ncrypt/crypt_mod_smime_gpgme.c index 0d7cbc7b977..b445decb200 100644 --- a/ncrypt/crypt_mod_smime_gpgme.c +++ b/ncrypt/crypt_mod_smime_gpgme.c @@ -61,9 +61,9 @@ static int crypt_mod_smime_application_handler(struct Body *m, struct State *s) return smime_gpgme_application_handler(m, s); } -static char *crypt_mod_smime_findkeys(struct Address *adrlist, int oppenc_mode) +static char *crypt_mod_smime_findkeys(struct Address *addrlist, int oppenc_mode) { - return smime_gpgme_findkeys(adrlist, oppenc_mode); + return smime_gpgme_findkeys(addrlist, oppenc_mode); } static struct Body *crypt_mod_smime_sign_message(struct Body *a) diff --git a/ncrypt/cryptglue.c b/ncrypt/cryptglue.c index 3a90ae88e08..854c64fc8be 100644 --- a/ncrypt/cryptglue.c +++ b/ncrypt/cryptglue.c @@ -222,10 +222,10 @@ struct Body *crypt_pgp_make_key_attachment(char *tempf) * It returns NULL if any of the keys can not be found. If oppenc_mode is * true, only keys that can be determined without prompting will be used. */ -char *crypt_pgp_findkeys(struct Address *adrlist, int oppenc_mode) +char *crypt_pgp_findkeys(struct Address *addrlist, int oppenc_mode) { if (CRYPT_MOD_CALL_CHECK(PGP, findkeys)) - return (CRYPT_MOD_CALL(PGP, findkeys))(adrlist, oppenc_mode); + return (CRYPT_MOD_CALL(PGP, findkeys))(addrlist, oppenc_mode); return NULL; } @@ -367,10 +367,10 @@ int crypt_smime_verify_sender(struct Header *h) * It returns NULL if any of the keys can not be found. If oppenc_mode is * true, only keys that can be determined without prompting will be used. */ -char *crypt_smime_findkeys(struct Address *adrlist, int oppenc_mode) +char *crypt_smime_findkeys(struct Address *addrlist, int oppenc_mode) { if (CRYPT_MOD_CALL_CHECK(SMIME, findkeys)) - return (CRYPT_MOD_CALL(SMIME, findkeys))(adrlist, oppenc_mode); + return (CRYPT_MOD_CALL(SMIME, findkeys))(addrlist, oppenc_mode); return NULL; } diff --git a/ncrypt/cryptglue.h b/ncrypt/cryptglue.h index d5b8594b38e..de8c48d13e7 100644 --- a/ncrypt/cryptglue.h +++ b/ncrypt/cryptglue.h @@ -30,7 +30,7 @@ struct State; void crypt_pgp_void_passphrase(void); int crypt_pgp_valid_passphrase(void); struct Body *crypt_pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist); -char *crypt_pgp_findkeys(struct Address *adrlist, int oppenc_mode); +char *crypt_pgp_findkeys(struct Address *addrlist, int oppenc_mode); struct Body *crypt_pgp_sign_message(struct Body *a); struct Body *crypt_pgp_encrypt_message(struct Body *a, char *keylist, int sign); void crypt_pgp_invoke_import(const char *fname); @@ -39,7 +39,7 @@ void crypt_pgp_set_sender(const char *sender); void crypt_smime_void_passphrase(void); int crypt_smime_valid_passphrase(void); -char *crypt_smime_findkeys(struct Address *adrlist, int oppenc_mode); +char *crypt_smime_findkeys(struct Address *addrlist, int oppenc_mode); struct Body *crypt_smime_sign_message(struct Body *a); struct Body *crypt_smime_build_smime_entity(struct Body *a, char *certlist); void crypt_smime_invoke_import(char *infile, char *mailbox); diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index ebd09208e88..3765c6f2ae7 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -1237,7 +1237,7 @@ struct Body *pgp_sign_message(struct Body *a) * It returns NULL if any of the keys can not be found. If oppenc_mode is * true, only keys that can be determined without prompting will be used. */ -char *pgp_find_keys(struct Address *adrlist, int oppenc_mode) +char *pgp_find_keys(struct Address *addrlist, int oppenc_mode) { struct ListHead crypt_hook_list = STAILQ_HEAD_INITIALIZER(crypt_hook_list); struct ListNode *crypt_hook = NULL; @@ -1253,7 +1253,7 @@ char *pgp_find_keys(struct Address *adrlist, int oppenc_mode) const char *fqdn = mutt_fqdn(1); - for (p = adrlist; p; p = p->next) + for (p = addrlist; p; p = p->next) { key_selected = false; mutt_crypt_hook(&crypt_hook_list, p); diff --git a/ncrypt/pgp.h b/ncrypt/pgp.h index 7a7d2e8e93b..752cf1ea2c0 100644 --- a/ncrypt/pgp.h +++ b/ncrypt/pgp.h @@ -50,7 +50,7 @@ char *pgp_fpr_or_lkeyid(struct PgpKeyInfo * k); int pgp_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur); -char *pgp_find_keys(struct Address *adrlist, int oppenc_mode); +char *pgp_find_keys(struct Address *addrlist, int oppenc_mode); int pgp_application_pgp_handler(struct Body *m, struct State *s); int pgp_encrypted_handler(struct Body *a, struct State *s); diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 8f4b977dddc..511994b19a0 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -871,7 +871,7 @@ void smime_getkeys(struct Envelope *env) * If oppenc_mode is true, only keys that can be determined without * prompting will be used. */ -char *smime_find_keys(struct Address *adrlist, int oppenc_mode) +char *smime_find_keys(struct Address *addrlist, int oppenc_mode) { struct SmimeKey *key = NULL; char *keyID = NULL, *keylist = NULL; @@ -879,7 +879,7 @@ char *smime_find_keys(struct Address *adrlist, int oppenc_mode) size_t keylist_used = 0; struct Address *p = NULL, *q = NULL; - for (p = adrlist; p; p = p->next) + for (p = addrlist; p; p = p->next) { char buf[LONG_STRING]; diff --git a/ncrypt/smime.h b/ncrypt/smime.h index da37238985b..e46f0c98edd 100644 --- a/ncrypt/smime.h +++ b/ncrypt/smime.h @@ -57,7 +57,7 @@ struct Body *smime_build_smime_entity(struct Body *a, char *certlist); int smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile); int smime_verify_sender(struct Header *h); void smime_getkeys(struct Envelope *env); -char *smime_find_keys(struct Address *adrlist, int oppenc_mode); +char *smime_find_keys(struct Address *addrlist, int oppenc_mode); void smime_invoke_import(char *infile, char *mailbox); int smime_send_menu(struct Header *msg); diff --git a/protos.h b/protos.h index 961a4b8eea9..860fbd4a5e8 100644 --- a/protos.h +++ b/protos.h @@ -126,7 +126,7 @@ char *mutt_expand_path_regex(char *s, size_t slen, int regex); char *mutt_find_hook(int type, const char *pat); char *mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw); char *mutt_get_body_charset(char *d, size_t dlen, struct Body *b); -void mutt_crypt_hook(struct ListHead *list, struct Address *adr); +void mutt_crypt_hook(struct ListHead *list, struct Address *addr); void mutt_timeout_hook(void); void mutt_startup_shutdown_hook(int type); int mutt_set_xdg_path(enum XdgType type, char *buf, size_t bufsize); @@ -221,7 +221,7 @@ void mutt_tag_set_flag(int flag, int bf); void mutt_update_encoding(struct Body *a); void mutt_version(void); void mutt_view_attachments(struct Header *hdr); -void mutt_write_address_list(struct Address *adr, FILE *fp, int linelen, bool display); +void mutt_write_address_list(struct Address *addr, FILE *fp, int linelen, bool display); bool mutt_addr_is_user(struct Address *addr); int mutt_addwch(wchar_t wc); int mutt_alias_complete(char *s, size_t buflen); diff --git a/recvcmd.c b/recvcmd.c index d5be3d932de..a3c79ee24a1 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -123,7 +123,7 @@ void mutt_attach_bounce(FILE *fp, struct AttachCtx *actx, struct Body *cur) char prompt[STRING]; char buf[HUGE_STRING]; char *err = NULL; - struct Address *adr = NULL; + struct Address *addr = NULL; int ret = 0; int p = 0; @@ -170,25 +170,25 @@ void mutt_attach_bounce(FILE *fp, struct AttachCtx *actx, struct Body *cur) if (mutt_get_field(prompt, buf, sizeof(buf), MUTT_ALIAS) || buf[0] == '\0') return; - adr = mutt_addr_parse_list(adr, buf); - if (!adr) + addr = mutt_addr_parse_list(addr, buf); + if (!addr) { mutt_error(_("Error parsing address!")); return; } - adr = mutt_expand_aliases(adr); + addr = mutt_expand_aliases(addr); - if (mutt_addrlist_to_intl(adr, &err) < 0) + if (mutt_addrlist_to_intl(addr, &err) < 0) { mutt_error(_("Bad IDN: '%s'"), err); FREE(&err); - mutt_addr_free(&adr); + mutt_addr_free(&addr); return; } buf[0] = 0; - mutt_addr_write(buf, sizeof(buf), adr, true); + mutt_addr_write(buf, sizeof(buf), addr, true); #define EXTRA_SPACE (15 + 7 + 2) /* @@ -208,7 +208,7 @@ void mutt_attach_bounce(FILE *fp, struct AttachCtx *actx, struct Body *cur) if (query_quadoption(Bounce, prompt) != MUTT_YES) { - mutt_addr_free(&adr); + mutt_addr_free(&addr); mutt_window_clearline(MuttMessageWindow, 0); mutt_message(p ? _("Message not bounced.") : _("Messages not bounced.")); return; @@ -217,13 +217,13 @@ void mutt_attach_bounce(FILE *fp, struct AttachCtx *actx, struct Body *cur) mutt_window_clearline(MuttMessageWindow, 0); if (cur) - ret = mutt_bounce_message(fp, cur->hdr, adr); + ret = mutt_bounce_message(fp, cur->hdr, addr); else { for (short i = 0; i < actx->idxlen; i++) { if (actx->idx[i]->content->tagged) - if (mutt_bounce_message(actx->idx[i]->fp, actx->idx[i]->content->hdr, adr)) + if (mutt_bounce_message(actx->idx[i]->fp, actx->idx[i]->content->hdr, addr)) ret = 1; } } @@ -234,7 +234,7 @@ void mutt_attach_bounce(FILE *fp, struct AttachCtx *actx, struct Body *cur) mutt_error(p ? _("Error bouncing message!") : _("Error bouncing messages!")); - mutt_addr_free(&adr); + mutt_addr_free(&addr); } /** diff --git a/send.c b/send.c index 92ced756a88..dd66c73328e 100644 --- a/send.c +++ b/send.c @@ -1034,7 +1034,7 @@ static struct Address *set_reverse_name(struct Envelope *env) struct Address *mutt_default_from(void) { - struct Address *adr = NULL; + struct Address *addr = NULL; const char *fqdn = mutt_fqdn(1); /* @@ -1043,21 +1043,21 @@ struct Address *mutt_default_from(void) */ if (From) - adr = mutt_addr_copy(From); + addr = mutt_addr_copy(From); else if (UseDomain) { - adr = mutt_addr_new(); - adr->mailbox = + addr = mutt_addr_new(); + addr->mailbox = mutt_mem_malloc(mutt_str_strlen(Username) + mutt_str_strlen(fqdn) + 2); - sprintf(adr->mailbox, "%s@%s", NONULL(Username), NONULL(fqdn)); + sprintf(addr->mailbox, "%s@%s", NONULL(Username), NONULL(fqdn)); } else { - adr = mutt_addr_new(); - adr->mailbox = mutt_str_strdup(NONULL(Username)); + addr = mutt_addr_new(); + addr->mailbox = mutt_str_strdup(NONULL(Username)); } - return adr; + return addr; } static int send_message(struct Header *msg) diff --git a/sendlib.c b/sendlib.c index 9bb56ad4888..51a83a37478 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1607,19 +1607,19 @@ struct Body *mutt_remove_multipart(struct Body *b) * So we can handle very large recipient lists without needing a huge temporary * buffer in memory */ -void mutt_write_address_list(struct Address *adr, FILE *fp, int linelen, bool display) +void mutt_write_address_list(struct Address *addr, FILE *fp, int linelen, bool display) { struct Address *tmp = NULL; char buf[LONG_STRING]; int count = 0; size_t len; - while (adr) + while (addr) { - tmp = adr->next; - adr->next = NULL; + tmp = addr->next; + addr->next = NULL; buf[0] = 0; - mutt_addr_write(buf, sizeof(buf), adr, display); + mutt_addr_write(buf, sizeof(buf), addr, display); len = mutt_str_strlen(buf); if (count && linelen + len > 74) { @@ -1628,7 +1628,7 @@ void mutt_write_address_list(struct Address *adr, FILE *fp, int linelen, bool di } else { - if (count && adr->mailbox) + if (count && addr->mailbox) { fputc(' ', fp); linelen++; @@ -1636,13 +1636,13 @@ void mutt_write_address_list(struct Address *adr, FILE *fp, int linelen, bool di linelen += len; } fputs(buf, fp); - adr->next = tmp; - if (!adr->group && adr->next && adr->next->mailbox) + addr->next = tmp; + if (!addr->group && addr->next && addr->next->mailbox) { linelen++; fputc(',', fp); } - adr = adr->next; + addr = addr->next; count++; } fputc('\n', fp);