diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2000-01-24 11:08:20 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2000-01-24 11:08:20 +0000 |
commit | de6f0a8330d549f1052a3b26e6073c35995a7e18 (patch) | |
tree | 696d1eca843db2c594dcec4de531b724df995388 | |
parent | 1d7d8f2235042b21886dea5d1becb98ea1ad8f17 (diff) |
Removing rewrite_uucp. There were too many objections against it.
-rw-r--r-- | init.h | 6 | ||||
-rw-r--r-- | mutt.h | 1 | ||||
-rw-r--r-- | rfc822.c | 39 |
3 files changed, 2 insertions, 44 deletions
@@ -1568,12 +1568,6 @@ struct option_t MuttVars[] = { ** messages you are replying to. If the variable is unset, the ** \fIFrom:\fP line will use your address on the current machine. */ - { "rewrite_uucp", DT_BOOL, R_INDEX, OPTREWRITEUUCP, 0 }, - /* - ** .pp - ** When this option is set, mutt rewrites uucp-style "bang paths" to - ** internet addresses. - */ { "rfc2047_parameters", DT_BOOL, R_NONE, OPTRFC2047PARAMS, 0 }, /* ** .pp @@ -321,7 +321,6 @@ enum OPTRESOLVE, OPTREVALIAS, OPTREVNAME, - OPTREWRITEUUCP, OPTRFC2047PARAMS, OPTSAVEADDRESS, OPTSAVEEMPTY, @@ -204,8 +204,6 @@ parse_mailboxdomain (const char *s, const char *nonspecial, return s; } - - static const char * parse_address (const char *s, char *token, size_t *tokenlen, size_t tokenmax, @@ -231,7 +229,7 @@ parse_address (const char *s, token[*tokenlen] = 0; addr->mailbox = safe_strdup (token); - + if (*commentlen && !addr->personal) { comment[*commentlen] = 0; @@ -489,37 +487,6 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s) return top; } -static short -rewrite_uucp (char *dest, char *src, size_t destlen) -{ - char *domain, *user, *tmp; - short quoted, quoted_string; - - if (!src || !*src) - return -1; - - for (user = tmp = src, domain = NULL, quoted = quoted_string = 0; *tmp; tmp++) - { - switch (*tmp) - { - case '"': if (!quoted) quoted_string ^= 1; quoted = 0; break; - case '@': return -1; - case '\\': quoted ^= 1; break; - case '!': if (!quoted && !quoted_string) { domain = user; user = tmp + 1; } - default: quoted = 0; break; - } - } - - if (domain == NULL) - return -1; - - if (destlen <= tmp - domain) - return -1; - - snprintf (dest, tmp - domain + 1, "%s@%s", user, domain); - return 0; -} - void rfc822_qualify (ADDRESS *addr, const char *host) { char *p; @@ -648,9 +615,7 @@ void rfc822_write_address_single (char *buf, size_t buflen, ADDRESS *addr) { if (!buflen) goto done; - if (!option (OPTREWRITEUUCP) || - rewrite_uucp (pbuf, addr->mailbox, buflen) == -1) - strfcpy (pbuf, addr->mailbox, buflen); + strfcpy (pbuf, addr->mailbox, buflen); len = mutt_strlen (pbuf); pbuf += len; buflen -= len; |