From a47dfadde7d7df81cd47856379957866ae88986b Mon Sep 17 00:00:00 2001 From: David Levine Date: Fri, 23 Nov 2012 09:26:21 -0600 Subject: [PATCH] slocal used to support two different formats for three of its arguments: [address info sender] [-addr address] [-info data] [-sender sender] But it hasn't properly supported the first form since at least April 1999. So, I removed that first form from the man page and the broken support from the code. Score another for the test suite! --- man/slocal.man | 5 ++--- uip/slocal.c | 19 +++---------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/man/slocal.man b/man/slocal.man index d0b24e4..10851e4 100644 --- a/man/slocal.man +++ b/man/slocal.man @@ -1,4 +1,4 @@ -.TH SLOCAL %manext1% "November 9, 2012" "%nmhversion%" +.TH SLOCAL %manext1% "November 23, 2012" "%nmhversion%" .\" .\" %nmhwarning% .\" @@ -8,7 +8,6 @@ slocal \- asynchronously filter and deliver new mail .HP 5 .na .B %libdir%/slocal -[address\ info\ sender] .RB [ \-addr .IR address ] .RB [ \-info @@ -59,7 +58,7 @@ Under .BR sendmail , the sender will obtained from the UUCP \*(lqFrom:\*(rq line, if present. The user may override these -values with command line arguments, or arguments to the +values with the .B \-addr and .B \-sender diff --git a/uip/slocal.c b/uip/slocal.c index 80620a7..a7283bf 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -222,8 +222,7 @@ main (int argc, char **argv) adios (NULL, "-%s unknown", cp); case HELPSW: - snprintf (buf, sizeof(buf), - "%s [switches] [address info sender]", invo_name); + snprintf (buf, sizeof(buf), "%s [switches]", invo_name); print_help (buf, switches, 0); done (0); case VERSIONSW: @@ -284,20 +283,8 @@ main (int argc, char **argv) debug++; continue; } - } - - switch (argp - (argv + 1)) { - case 1: - addr = cp; - break; - - case 2: - info = cp; - break; - - case 3: - sender = cp; - break; + } else { + adios (NULL, "only switch arguments are supported"); } } -- 1.7.10.4