[comp.mail.mush] Patch to make mush quote address instead of full-name

timcc@csv.viccol.edu.au (Tim Cook) (06/21/91)

A little patch for those who would like Mush to generate the "alternate"
form of address that includes a real-name.  The "standard" form, which mush
creates is:

   From: user@host.domain (Joe User)

and the "alternate" form, which will be generated when this patch is
applied, and QUOTE_ADDRESS is defined during compilation, is:

   From: Joe User <user@host.domain>

This is a context-diff from Mush version 7.2.3.  I also used it for ages on
version 6.5.6.


*** mail.c.orig	Tue Jun 11 16:36:28 1991
--- mail.c	Tue Jun 11 16:54:12 1991
***************
*** 1538,1559 ****
--- 1538,1569 ----
  	    }
  	}
      if (ison(flags, FORWARD))
  	pF += Strcpy(From_buf, "Resent-");
      pF += Strcpy(pF, "From: ");
+ #ifdef QUOTE_ADDRESS
+     if ((p = do_set(set_options, "realname")) ||
+ 	(p = do_set(set_options, "name")))
+         pF += Strcpy(pF, p);
+     pF += Strcpy(pF, " <");
+ #endif /* QUOTE_ADDRESS */
  #ifdef UUCP
      if (host && *host)
  	pF += strlen(sprintf(pF, "%s!", host));
  #endif /* UUCP */
      pF += Strcpy(pF, login);
  #ifndef UUCP
      if (host && *host)
  	pF += strlen(sprintf(pF, "@%s", host));
  #endif /* UUCP */
+ #ifdef QUOTE_ADDRESS
+     pF += Strcpy(pF, ">");
+ #else
      if ((p = do_set(set_options, "realname")) ||
  	(p = do_set(set_options, "name")))
  	pF += strlen(sprintf(pF, " (%s)", p));
+ #endif /* QUOTE_ADDRESS */
      *pF++ = '\n', *pF++ = 0;
  
      /* First print From, Date, In-Reply-To */
      for (i = 0; i < size; i++) {
  	if (!files[i])