Article View: comp.mail.misc
Article #4384Re: UCB Mail with reply include
From: mlandau
Date: Tue, 15 Sep 1987 03:26
Date: Tue, 15 Sep 1987 03:26
78 lines
2798 bytes
2798 bytes
Well, after watching this discussion go round and round for a couple of weeks,
I finally sez to myself, I sez, "Well, how tough can it be?" The answer is
not very.
Herewith, the diffs to the version of mailx supplied with SunOS 3.2 -- your
line numbers may vary. These trivial changes add a string variable called
indent_str (name chosen for compatibility with the recently-posted mush
program) -- if set, it will be prepended to every line inserted with the ~f
command.
The source for mail is a little different for the vanilla UCB mail in the
BSD release, but the modifications ahould be equally straightforward.
-- PATCH TO src/ucb/Mail/collect.c BEGINS HERE --
*** collect.c+ Mon Sep 14 23:12:18 1987
--- collect.c Mon Sep 14 23:10:17 1987
***************
*** 785,790 ****
--- 785,793 ----
register int *msgvec, *ip;
extern char tempMail[];
int tabputs();
+ #ifdef INDENT_STR
+ extern int tabputs(), prefixputs();
+ #endif
msgvec = (int *) salloc((msgCount+1) * sizeof *msgvec);
if (msgvec == (int *) NOSTR)
***************
*** 804,810 ****
--- 807,817 ----
touch(*ip);
printf(" %d", *ip);
if (msend(&message[*ip-1], obuf, (int)value("alwaysignore"),
+ #ifdef INDENT_STR
+ f == 'm' ? tabputs : prefixputs) < 0) {
+ #else
f == 'm' ? tabputs : fputs) < 0) {
+ #endif
perror(tempMail);
return(-1);
}
***************
*** 820,825 ****
--- 827,853 ----
fputc('\t', obuf);
fputs(line, obuf);
}
+
+ #ifdef INDENT_STR
+
+ prefixputs(line, obuf)
+ char *line;
+ FILE *obuf;
+ {
+ static char *prefstr = NULL;
+ static int usepref = -1;
+
+ if (usepref < 0)
+ {
+ prefstr = value("indent_str");
+ usepref = prefstr != NOSTR;
+ }
+ if (prefstr)
+ fputs(prefstr, obuf);
+ fputs(line, obuf);
+ }
+
+ #endif
# ifdef VMUNIX
/*
--
Matt Landau
mlandau@bbn.com
Standards are the industry's way of codifying obsolence.
Technical Details
Message-ID:
<8770@garnet.BBN.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!ima!bbn!diamond.bbn.com!mlandauReferences:
<1392@bloom-beacon.MIT.EDU> <890@bakerst.UUCP> <1053@moscom.UUCP> <773@hplabsz.HPL.HP.COM> <2178@sol.ARPA>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!ima!bbn!diamond.bbn.com!mlandau From: mlandau@diamond.bbn.com.UUCP Newsgroups: comp.mail.misc,comp.sources.wanted Subject: Re: UCB Mail with reply include Message-ID: <8770@garnet.BBN.COM> Date: Mon, 14-Sep-87 23:26:08 EDT Article-I.D.: garnet.8770 Posted: Mon Sep 14 23:26:08 1987 Date-Received: Wed, 16-Sep-87 05:58:45 EDT References: <1392@bloom-beacon.MIT.EDU> <890@bakerst.UUCP> <1053@moscom.UUCP> <773@hplabsz.HPL.HP.COM> <2178@sol.ARPA> Reply-To: mlandau@bbn.com (Matt Landau) Followup-To: comp.mail.misc Distribution: world Organization: BBN Laboratories Incorporated, Cambridge, MA Lines: 78 Keywords: mail replies, mailx, inclusion, cute little whatevers Summary: diffs to Sun mailx