Article View: comp.mail.mush
Article #819Patch to make mush quote address instead of full-name
From: Tim Cook
Date: Thu, 20 Jun 1991 21:25
Date: Thu, 20 Jun 1991 21:25
52 lines
1979 bytes
1979 bytes
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])
Technical Details
Message-ID:
<1991Jun20.162535.6721@csv.viccol.edu.au>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!bellcore!uunet!munnari.oz.au!murtoa.cs.mu.oz.au!csv.viccol.edu.au!timccShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!bellcore!uunet!munnari.oz.au!murtoa.cs.mu.oz.au!csv.viccol.edu.au!timcc From: timcc@csv.viccol.edu.au (Tim Cook) Newsgroups: comp.mail.mush Subject: Patch to make mush quote address instead of full-name Message-ID: <1991Jun20.162535.6721@csv.viccol.edu.au> Date: 20 Jun 91 21:25:34 GMT Organization: Computer Services, Victoria College, Melbourne Lines: 52