From 5841a6c7b61ded87d711f49c6e86ccfabfe5dc51 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Mon, 5 Jun 2017 18:51:02 +0100 Subject: [PATCH] drop configure options --enable-exact-address Unused option. --- INSTALL | 7 ------ address.h | 3 --- alias.c | 4 --- configure.ac | 8 ------ doc/manual.xml.head | 13 ---------- hcache/hcache.c | 6 ----- query.c | 4 --- rfc2047.c | 8 ------ rfc822.c | 61 --------------------------------------------- version.c | 5 ---- 10 files changed, 119 deletions(-) diff --git a/INSTALL b/INSTALL index 75d16b7cb38..c40d2d4c3e5 100644 --- a/INSTALL +++ b/INSTALL @@ -116,13 +116,6 @@ to ``configure'' to help it out, or change the default behavior: LC_CTYPE correctly, then you might find you can solve the problem with either or both of --enable-locales-fix and --without-wc-funcs. ---enable-exact-address - By default, Mutt will rewrite all addresses in the form - Personal Name - regardless of the input. By enabling this option, Mutt will write - addresses in the same form they are parsed. NOTE: this requires - significantly more memory. - Once ``configure'' has completed, simply type ``make install.'' Mutt should compile cleanly (without errors) and you should end up with a diff --git a/address.h b/address.h index b303cd69a32..f2e052d4d4a 100644 --- a/address.h +++ b/address.h @@ -22,9 +22,6 @@ struct Address { -#ifdef EXACT_ADDRESS - char *val; /* value of address as parsed */ -#endif char *personal; /* real name of address */ char *mailbox; /* mailbox and host address */ int group; /* group mailbox? */ diff --git a/alias.c b/alias.c index 08587148c09..4134e0c2af0 100644 --- a/alias.c +++ b/alias.c @@ -108,10 +108,6 @@ static struct Address *expand_aliases_r(struct Address *a, struct List **expn) mutt_gecos_name(namebuf, sizeof(namebuf), pw); mutt_str_replace(&a->personal, namebuf); - -#ifdef EXACT_ADDRESS - FREE(&a->val); -#endif } } } diff --git a/configure.ac b/configure.ac index 590570a4d29..1afaec88e33 100644 --- a/configure.ac +++ b/configure.ac @@ -630,14 +630,6 @@ AC_ARG_ENABLE(locales-fix, AS_HELP_STRING([--enable-locales-fix],[The result of AC_DEFINE(LOCALES_HACK,1,[ Define if the result of isprint() is unreliable. ]) fi]) -AC_ARG_ENABLE(exact-address, AS_HELP_STRING([--enable-exact-address],[Enable regeneration of email addresses]), - [if test $enableval = yes; then - AC_DEFINE(EXACT_ADDRESS,1, - [Enable exact regeneration of email addresses as parsed? - NOTE: this requires significant more memory when defined.]) - - fi]) - dnl -- start cache -- hcache_db_used= AC_ARG_WITH(gdbm, diff --git a/doc/manual.xml.head b/doc/manual.xml.head index b3800e316ab..1b28fbd61d4 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -9484,19 +9484,6 @@ folder-hook imap://user@host2/ 'set folder=imap://host2/ ; set record=+INBOX/Sen - - Exact Address Generation - Mutt supports the - Name <user@host>address syntax for reading and - writing messages, the older - user@host (Name)syntax is only supported when reading - messages. The - --enable-exact-address switch can be given to - configure to build it with write-support for the latter syntax. - +exact_address in the output of - mutt -v indicates whether it's supported. - - Sending Anonymous Messages via Mixmaster You may also have compiled Mutt to co-operate with Mixmaster, an diff --git a/hcache/hcache.c b/hcache/hcache.c index 788aecd642a..d807b7e3c9f 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -241,9 +241,6 @@ static unsigned char *dump_address(struct Address *a, unsigned char *d, int *off while (a) { -#ifdef EXACT_ADDRESS - d = dump_char(a->val, d, off, convert); -#endif d = dump_char(a->personal, d, off, convert); d = dump_char(a->mailbox, d, off, 0); d = dump_int(a->group, d, off); @@ -265,9 +262,6 @@ static void restore_address(struct Address **a, const unsigned char *d, int *off while (counter) { *a = rfc822_new_address(); -#ifdef EXACT_ADDRESS - restore_char(&(*a)->val, d, off, convert); -#endif restore_char(&(*a)->personal, d, off, convert); restore_char(&(*a)->mailbox, d, off, 0); restore_int((unsigned int *) &(*a)->group, d, off); diff --git a/query.c b/query.c index ab74f7921fb..71be119c334 100644 --- a/query.c +++ b/query.c @@ -184,10 +184,6 @@ static int query_search(struct Menu *m, regex_t *re, int n) if (table[n].data->addr->mailbox && !regexec(re, table[n].data->addr->mailbox, 0, NULL, 0)) return 0; -#ifdef EXACT_ADDRESS - if (table[n].data->addr->val && !regexec(re, table[n].data->addr->val, 0, NULL, 0)) - return 0; -#endif } return REG_NOMATCH; diff --git a/rfc2047.c b/rfc2047.c index f4986e17a5e..ef79612f1f1 100644 --- a/rfc2047.c +++ b/rfc2047.c @@ -592,10 +592,6 @@ void rfc2047_encode_adrlist(struct Address *addr, const char *tag) _rfc2047_encode_string(&ptr->personal, 1, col); else if (ptr->group && ptr->mailbox) _rfc2047_encode_string(&ptr->mailbox, 1, col); -#ifdef EXACT_ADDRESS - if (ptr->val) - _rfc2047_encode_string(&ptr->val, 1, col); -#endif ptr = ptr->next; } } @@ -887,10 +883,6 @@ void rfc2047_decode_adrlist(struct Address *a) rfc2047_decode(&a->personal); else if (a->group && a->mailbox && (strstr(a->mailbox, "=?") != NULL)) rfc2047_decode(&a->mailbox); -#ifdef EXACT_ADDRESS - if (a->val && strstr(a->val, "=?") != NULL) - rfc2047_decode(&a->val); -#endif a = a->next; } } diff --git a/rfc822.c b/rfc822.c index 2b7f910af46..3c4380406db 100644 --- a/rfc822.c +++ b/rfc822.c @@ -89,9 +89,6 @@ static void free_address(struct Address *a) { FREE(&a->personal); FREE(&a->mailbox); -#ifdef EXACT_ADDRESS - FREE(&a->val); -#endif FREE(&a); } @@ -133,9 +130,6 @@ void rfc822_free_address(struct Address **p) { t = *p; *p = (*p)->next; -#ifdef EXACT_ADDRESS - FREE(&t->val); -#endif FREE(&t->personal); FREE(&t->mailbox); FREE(&t); @@ -367,9 +361,6 @@ static void add_addrspec(struct Address **top, struct Address **last, const char struct Address *rfc822_parse_adrlist(struct Address *top, const char *s) { int ws_pending, nl; -#ifdef EXACT_ADDRESS - const char *begin = NULL; -#endif const char *ps = NULL; char comment[LONG_STRING], phrase[LONG_STRING]; size_t phraselen = 0, commentlen = 0; @@ -386,9 +377,6 @@ struct Address *rfc822_parse_adrlist(struct Address *top, const char *s) nl = s[nl - 1] == '\n'; s = skip_email_wsp(s); -#ifdef EXACT_ADDRESS - begin = s; -#endif while (*s) { if (*s == ',') @@ -404,16 +392,9 @@ struct Address *rfc822_parse_adrlist(struct Address *top, const char *s) last->personal = safe_strdup(comment); } -#ifdef EXACT_ADDRESS - if (last && !last->val) - last->val = mutt_substrdup(begin, s); -#endif commentlen = 0; phraselen = 0; s++; -#ifdef EXACT_ADDRESS - begin = skip_email_wsp(s); -#endif } else if (*s == '(') { @@ -450,16 +431,9 @@ struct Address *rfc822_parse_adrlist(struct Address *top, const char *s) top = cur; last = cur; -#ifdef EXACT_ADDRESS - last->val = mutt_substrdup(begin, s); -#endif - phraselen = 0; commentlen = 0; s++; -#ifdef EXACT_ADDRESS - begin = skip_email_wsp(s); -#endif } else if (*s == ';') { @@ -473,10 +447,6 @@ struct Address *rfc822_parse_adrlist(struct Address *top, const char *s) terminate_buffer(comment, commentlen); last->personal = safe_strdup(comment); } -#ifdef EXACT_ADDRESS - if (last && !last->val) - last->val = mutt_substrdup(begin, s); -#endif /* add group terminator */ cur = rfc822_new_address(); @@ -489,9 +459,6 @@ struct Address *rfc822_parse_adrlist(struct Address *top, const char *s) phraselen = 0; commentlen = 0; s++; -#ifdef EXACT_ADDRESS - begin = skip_email_wsp(s); -#endif } else if (*s == '<') { @@ -542,10 +509,6 @@ struct Address *rfc822_parse_adrlist(struct Address *top, const char *s) terminate_buffer(comment, commentlen); last->personal = safe_strdup(comment); } -#ifdef EXACT_ADDRESS - if (last) - last->val = mutt_substrdup(begin, s - nl < begin ? begin : s - nl); -#endif return top; } @@ -601,27 +564,6 @@ void rfc822_write_address_single(char *buf, size_t buflen, struct Address *addr, buflen--; /* save room for the terminal nul */ -#ifdef EXACT_ADDRESS - if (addr->val) - { - if (!buflen) - goto done; - strfcpy(pbuf, addr->val, buflen); - len = mutt_strlen(pbuf); - pbuf += len; - buflen -= len; - if (addr->group) - { - if (!buflen) - goto done; - *pbuf++ = ':'; - buflen--; - *pbuf = 0; - } - return; - } -#endif - if (addr->personal) { if (strpbrk(addr->personal, RFC822Specials)) @@ -787,9 +729,6 @@ struct Address *rfc822_cpy_adr_real(struct Address *addr) { struct Address *p = rfc822_new_address(); -#ifdef EXACT_ADDRESS - p->val = safe_strdup(addr->val); -#endif p->personal = safe_strdup(addr->personal); p->mailbox = safe_strdup(addr->mailbox); p->group = addr->group; diff --git a/version.c b/version.c index dea021c7ef3..0fc89f400a6 100644 --- a/version.c +++ b/version.c @@ -126,11 +126,6 @@ static struct CompileOptions comp_opts[] = { { "dotlock", 0 }, #endif { "encrypt_to_self", 1 }, -#ifdef EXACT_ADDRESS - { "exact_address", 1 }, -#else - { "exact_address", 0 }, -#endif #ifdef USE_FCNTL { "fcntl", 1 }, #else