aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Price <steve@FreeBSD.org>1996-12-14 06:14:32 +0000
committerSteve Price <steve@FreeBSD.org>1996-12-14 06:14:32 +0000
commitdb5b8caf544a6761865ff39f2e1a76fb8fe57b63 (patch)
tree09a83266487c4c5e413b7e1195b6c937e04400f8
parent11bde14e4fdf4e2c4c49c85be790bfb080e68170 (diff)
downloadsrc-db5b8caf544a6761865ff39f2e1a76fb8fe57b63.tar.gz
src-db5b8caf544a6761865ff39f2e1a76fb8fe57b63.zip
Cleanup man page and -Wall cleaning.
Notes
Notes: svn path=/head/; revision=20423
-rw-r--r--bin/rmail/rmail.88
-rw-r--r--bin/rmail/rmail.c23
-rw-r--r--bin/sleep/sleep.16
-rw-r--r--bin/sleep/sleep.c6
4 files changed, 27 insertions, 16 deletions
diff --git a/bin/rmail/rmail.8 b/bin/rmail/rmail.8
index 859a3c55c9b8..4691b177ff72 100644
--- a/bin/rmail/rmail.8
+++ b/bin/rmail/rmail.8
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)rmail.8 6.10 (Berkeley) 4/29/93
-.\" $Id$
+.\" $Id: rmail.8,v 1.2 1994/09/24 02:57:04 davidg Exp $
.\"
.Dd April 29, 1993
.Dt RMAIL 8
@@ -42,7 +42,7 @@
.Nm rmail
.Ar user ...
.Sh DESCRIPTION
-.Nm Rmail
+.Nm
interprets incoming mail received via
.Xr uucp 1 ,
collapsing ``From'' lines in the form generated
@@ -52,7 +52,7 @@ into a single line of the form ``return-path!sender'',
and passing the processed mail on to
.Xr sendmail 8 .
.Pp
-.Nm Rmail
+.Nm
is explicitly designed for use with
.Xr uucp
and
@@ -67,6 +67,6 @@ The
program appeared in
.Bx 4.2 .
.Sh BUGS
-.Nm Rmail
+.Nm
should not reside in
.Pa /bin .
diff --git a/bin/rmail/rmail.c b/bin/rmail/rmail.c
index b45ec457682e..def8ef305ce6 100644
--- a/bin/rmail/rmail.c
+++ b/bin/rmail/rmail.c
@@ -30,17 +30,17 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: rmail.c,v 1.5 1995/05/30 00:07:08 rgrimes Exp $
+ * $Id: rmail.c,v 1.6 1995/09/16 18:52:51 pst Exp $
*/
#ifndef lint
-static char copyright[] =
+static char const copyright[] =
"@(#) Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)rmail.c 8.1 (Berkeley) 5/31/93";
+static char const sccsid[] = "@(#)rmail.c 8.1 (Berkeley) 5/31/93";
#endif /* not lint */
/*
@@ -262,11 +262,22 @@ main(argc, argv)
/*
* Don't copy arguments beginning with - as they will be
* passed to sendmail and could be interpreted as flags.
+ * To prevent confusion of sendmail wrap < and > around
+ * the address (helps to pass addrs like @gw1,@gw2:aa@bb)
*/
- do {
- if (*argv && **argv == '-')
+ while (*argv) {
+ if (**argv == '-')
err(EX_USAGE, "dash precedes argument: %s", *argv);
- } while ((args[i++] = *argv++) != NULL);
+ if (strchr(*argv, ',') == NULL || strchr(*argv, '<') != NULL)
+ args[i++] = *argv;
+ else {
+ if ((args[i] = malloc(strlen(*argv) + 3)) == NULL)
+ err(EX_TEMPFAIL, "Cannot malloc");
+ sprintf (args [i++], "<%s>", *argv);
+ }
+ argv++;
+ }
+ args[i] = 0;
if (debug) {
(void)fprintf(stderr, "Sendmail arguments:\n");
diff --git a/bin/sleep/sleep.1 b/bin/sleep/sleep.1
index 1e4934bc066c..36539ee68a33 100644
--- a/bin/sleep/sleep.1
+++ b/bin/sleep/sleep.1
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)sleep.1 8.3 (Berkeley) 4/18/94
-.\" $Id$
+.\" $Id: sleep.1,v 1.2 1994/09/24 02:58:49 davidg Exp $
.\"
.Dd April 18, 1994
.Dt SLEEP 1
@@ -50,13 +50,13 @@ The
command
suspends execution for a minimum of
.Ar seconds .
-.Nm Sleep
+.Nm
is used to schedule the execution of other commands (see
.Sx EXAMPLES
below).
.Pp
The
-.Nm Sleep
+.Nm
utility exits with one of the following values:
.Bl -tag -width flag
.It Li \&0
diff --git a/bin/sleep/sleep.c b/bin/sleep/sleep.c
index 773abe830570..c77666734b96 100644
--- a/bin/sleep/sleep.c
+++ b/bin/sleep/sleep.c
@@ -30,17 +30,17 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: sleep.c,v 1.2 1994/09/24 02:58:51 davidg Exp $
*/
#ifndef lint
-static char copyright[] =
+static char const copyright[] =
"@(#) Copyright (c) 1988, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)sleep.c 8.3 (Berkeley) 4/2/94";
+static char const sccsid[] = "@(#)sleep.c 8.3 (Berkeley) 4/2/94";
#endif /* not lint */
#include <stdio.h>