From 280e7c1123597677b3c42e40a5e88aee5a84827d Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Tue, 9 Mar 1999 18:22:12 +0000 Subject: Tue Mar 9 13:18:14 1999 Thomas Bushnell, BSG * lmail.c (OPT_REMOVE): New macro. (options): Don't recognize -r as an alias for --remove, but recognize it separately as a hidden alias. (main / parse_opt): Make -d do nothing. Make -r an alias for -f. Have OPT_REMOVE do the removal thing. Reported by Mark Kettenis (kettenis@wins.uva.nl). --- daemons/ChangeLog | 9 +++++++++ daemons/lmail.c | 14 ++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'daemons') diff --git a/daemons/ChangeLog b/daemons/ChangeLog index 523f37f9..ac0b7818 100644 --- a/daemons/ChangeLog +++ b/daemons/ChangeLog @@ -1,3 +1,12 @@ +Tue Mar 9 13:18:14 1999 Thomas Bushnell, BSG + + * lmail.c (OPT_REMOVE): New macro. + (options): Don't recognize -r as an alias for --remove, but + recognize it separately as a hidden alias. + (main / parse_opt): Make -d do nothing. + Make -r an alias for -f. Have OPT_REMOVE do the removal thing. + Reported by Mark Kettenis (kettenis@wins.uva.nl). + 1998-12-06 Roland McGrath * lmail.c (deliver, main): Add braces to silence gcc warning. diff --git a/daemons/lmail.c b/daemons/lmail.c index 2013589a..f30c3b05 100644 --- a/daemons/lmail.c +++ b/daemons/lmail.c @@ -1,6 +1,6 @@ /* Local mail delivery - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Written by Miles Bader @@ -37,6 +37,7 @@ #include #define OPT_FILE -5 +#define OPT_REMOVE -6 const char *argp_program_version = STANDARD_HURD_VERSION (mail.local); @@ -45,8 +46,9 @@ options[] = { {"from", 'f', "USER", 0, "Record sender as USER"}, {0, 'd', 0, OPTION_ALIAS|OPTION_HIDDEN}, + {0, 'r', 0, OPTION_ALIAS|OPTION_HIDDEN}, {"file", OPT_FILE, "FILE", 0, "Deliver FILE instead of standard input"}, - {"remove", 'r', 0, 0, "Remove FILE after successful delivery"}, + {"remove", OPT_REMOVE, 0, 0, "Remove FILE after successful delivery"}, {"mail-dir",'m', "DIR", 0, "Look for mailboxes in DIR"}, {"use-lock-file",'l', 0, OPTION_HIDDEN, "Use a lock file instead of flock for mailboxes"}, @@ -445,11 +447,15 @@ main (int argc, char **argv) { switch (key) { - case 'f': case 'd': + case 'd': + /* do nothing; compatibility */ + break; + case 'f': + case 'r': params.from = arg; break; case OPT_FILE: file = arg; break; - case 'r': + case OPT_REMOVE: remove = 1; break; case 'm': params.mail_dir = arg; break; -- cgit v1.2.3