nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] rcvdist with non-default port

2018-01-15 11:21:49
But if the user wants to only pass a switch argument to post that does NOT
take an argument, it's not possible from them to get it right.

What do you propose that we do for 1.7.1?

Something like:

(in RCVDIST_SWITCHES)

    X("width columns", -5, WIDTHSW) \
    X("library directory", -7, LIBRARYSW) \
    X("idanno number", -6, ANNOWSW) \
    X("client host", -6, CLIENTSW) \
    X("server host", -6, SERVERSW) \
    X("port portname/number", -4, PORTSW) \
    [... etc ...]

and in the case argument:

    case WIDTHSW:
    case LIBRARYSW:
    case ANNOSW:
    case CLIENTSW:
    case SERVESW:
    case PORTSW:
    [... etc ...]
        if (argp && *argp) {
            vec[vecp++] = *argp++;
        } else {
            die("missing argument to %s", argp[-2]);
        }

Basically what we do everywhere else, which honestly, should have been
done way back in 1990 when rcvdist was first committed (let's call it,
"Fixing a 28 year old bug" :-)). We can save the global fix for this for
later.

--Ken

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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