[comp.mail.mh] Bug report: in "inc", the '-silent' and '-audit' switches clash

chapman@parc.xerox.com (Brent Chapman) (12/10/89)

My .mh_profile includes "-audit inc.audit" as part of my default
switches for the MH 6.6 "inc" command.  Normally, this works just fine;
the same summary that "inc" prints on my screen as it processes my
mailbox is appended to my "inc.audit" file, along with a timestamp to
tell me when the "inc" was done.

The "-silent" switch tells "inc" NOT to show me a line for each message
as it processes my mailbox; this is all well and good.  The "-silent"
switch ALSO apparently suppresses the output to my audit file, though;
this is _NOT_ well and good, and I consider it to be a bug in the "inc"
command.  It's not that serious a problem, and I don't have time to dig
through the MH sources right now to fix it (and I do mean DIG through
the sources; I've gone mucking around in MH sources before, so I know
what I'm in for, and I'm not anxious to do it again), but I wanted to
bring it to everyone's attention in case it _is_ a serious problem for
somebody else.

I really like the "-audit" feature, and am eagerly waiting for some
enterprising person to add it to the rest of the commands, like "forw",
"repl", and "refile"....  [Hint, hint!  :-]


-Brent
--
Brent Chapman                                   Xerox Palo Alto Research Center
UNIX Operations Manager                         3333 Coyote Hill Road
chapman@parc.xerox.com                          Palo Alto, CA  94304
                                                Phone:  415/494-4316

leres@ace.ee.lbl.gov (Craig Leres) (12/11/89)

Brent Chapman writes:
> The "-silent" switch tells "inc" NOT to show me a line for each message
> as it processes my mailbox; this is all well and good.  The "-silent"
> switch ALSO apparently suppresses the output to my audit file, though;

This is pretty easy to fix. I think the most straight forward method is
to add an "aud" argument to scan(). If it's non-zero, it's a FILE
pointer to put scan lines onto. Basically, all you have to do is move
two lines from inc.c into scansbr.c, pass the aud variable in to scan()
from inc, and then modify the other sources that use scan() (mshcmds.c
and rcvtty.c) to pass a zero in for the new argument.

		Craig