]> granicus.if.org Git - neomutt/commitdiff
Removing rewrite_uucp. There were too many objections against it.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 24 Jan 2000 11:08:20 +0000 (11:08 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 24 Jan 2000 11:08:20 +0000 (11:08 +0000)
init.h
mutt.h
rfc822.c

diff --git a/init.h b/init.h
index 42d072d6288258e32161100ffe50101b1ec977cf..66c4911c943bcafd2befd03c13b553f434cf33d4 100644 (file)
--- 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 01885d5ee0cc26dcf0f85ae953c0fe69a89c7e44..9e03e71c7f42ff0b7de2230b8aeb8d18c53c3c0e 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -321,7 +321,6 @@ enum
   OPTRESOLVE,
   OPTREVALIAS,
   OPTREVNAME,
-  OPTREWRITEUUCP,
   OPTRFC2047PARAMS,
   OPTSAVEADDRESS,
   OPTSAVEEMPTY,
index 023c4c694e5ae6324c56a48fef00a07cab1fc350..061fcac0c703f40ee1a2710a53ae73c7b5f74394 100644 (file)
--- 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;