summaryrefslogtreecommitdiff
path: root/daemons/lmail.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-03-09 18:22:12 +0000
committerThomas Bushnell <thomas@gnu.org>1999-03-09 18:22:12 +0000
commit280e7c1123597677b3c42e40a5e88aee5a84827d (patch)
tree82b7171a5f38e5326e6e372fb5a65025bf6ec3cf /daemons/lmail.c
parent120dee489f4eefe691133e221172e1ef67fe91a1 (diff)
Tue Mar 9 13:18:14 1999 Thomas Bushnell, BSG <tb@mit.edu>
* 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).
Diffstat (limited to 'daemons/lmail.c')
-rw-r--r--daemons/lmail.c14
1 files changed, 10 insertions, 4 deletions
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 <miles@gnu.ai.mit.edu>
@@ -37,6 +37,7 @@
#include <sys/time.h>
#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;