nmh-workers
[Top] [All Lists]

[Nmh-workers] obsolete optional slocal argument format

2012-11-21 23:14:04
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.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>