From: Thomas Roessler Date: Mon, 24 Jan 2000 11:08:20 +0000 (+0000) Subject: Removing rewrite_uucp. There were too many objections against it. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7117a09312e57a8566530916e173996e2d595985;p=neomutt Removing rewrite_uucp. There were too many objections against it. --- diff --git a/init.h b/init.h index 42d072d62..66c4911c9 100644 --- a/init.h +++ b/init.h @@ -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 diff --git a/mutt.h b/mutt.h index 01885d5ee..9e03e71c7 100644 --- a/mutt.h +++ b/mutt.h @@ -321,7 +321,6 @@ enum OPTRESOLVE, OPTREVALIAS, OPTREVNAME, - OPTREWRITEUUCP, OPTRFC2047PARAMS, OPTSAVEADDRESS, OPTSAVEEMPTY, diff --git a/rfc822.c b/rfc822.c index 023c4c694..061fcac0c 100644 --- a/rfc822.c +++ b/rfc822.c @@ -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;