- scan can now handle empty files without violating an assert [Bug #51693].
- An error when writing an error message, e.g. EPIPE, no longer causes
recursion until the stack is exhausted.
+- rcvdist(1) now passes switch arguments to post(8).
-------------------
DEPRECATED FEATURES
#undef X
#define X(sw, minchars, id) { sw, minchars, id },
-DEFINE_SWITCH_ARRAY(POST, post_switches);
+DEFINE_SWITCH_ARRAY(POST, post_switches_with_args);
#undef X
static char backup[BUFSIZ] = "";
case AMBIGSW:
ambigsw (cp, switches);
done (1);
- case UNKWNSW:
+ case UNKWNSW: {
+ const int argno = smatch(cp, post_switches_with_args);
vec[vecp++] = --cp;
- if (smatch(cp + 1, post_switches) != UNKWNSW) {
+ if (argno != AMBIGSW && argno != UNKWNSW) {
/* It's a post switch that does take an argument. */
if (!(cp = *argp) || *cp == '-') {
die("missing argument to %s", argp[-1]);
}
- vec[vecp++] = *argp++;
+ vec[vecp++] = cp;
+ ++argp;
}
continue;
-
+ }
case HELPSW:
snprintf (buf, sizeof(buf),
"%s [switches] [switches for postproc] address ...",