nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-workers] obsolete optional slocal argument format


From: David Levine
Subject: [Nmh-workers] obsolete optional slocal argument format
Date: Wed, 21 Nov 2012 23:13:46 -0600

slocal used to support two different formats for three of
its arguments:

  [address info sender]
  [-addr address] [-info data] [-sender sender]

But it no longer properly supports the first form.  Details
are below if anyone cares.

Unless there's objection, I'll remove that first form from
the documentation.  And the busted switch from the code,
just to be safe.

Thanks,
David


Sometime between MH 6.8.5 and entry into CVS in April 1999,
the argument processing was changed to use getarguments().
But that broke the handling of [address info sender].  The
relevant code is:

    arguments = getarguments (invo_name, argc, argv, 0);
    argp = arguments;

    /* increment argp for each argument . . . */

    switch (argp - (argv + 1)) {
        case 1:
            addr = cp;
            break;

        case 2:
            info = cp;
            break;

        case 3:
            sender = cp;
            break;
    }

getarguments() calls malloc() and returns the address
from the heap, so the comparison with argv is not valid.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]