summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authorsobrado <sobrado@openbsd.org>2009-10-29 20:11:09 +0000
committersobrado <sobrado@openbsd.org>2009-10-29 20:11:09 +0000
commit1d8c2aac128484a4b1a1c0b240fb26ace90c2a5a (patch)
tree9d2ff811da64ea717de924d0d8d71b4b0243d99f /usr.sbin/lpr
parentdo not discard the first character of the command after the -q option (diff)
downloadwireguard-openbsd-1d8c2aac128484a4b1a1c0b240fb26ace90c2a5a.tar.xz
wireguard-openbsd-1d8c2aac128484a4b1a1c0b240fb26ace90c2a5a.zip
it is possible specifying more than one printer concurrently; use
.Op macros for options instead of hardcoding brackets; remove a few superfluous .Ar macros before ellipsis; "usage:" is lower case; while here, apply some spacing tweaks. tweaked by jmc@ for a synopsis with too many arguments. ok jmc@
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/lpc/cmds.c22
-rw-r--r--usr.sbin/lpr/lpc/lpc.835
2 files changed, 30 insertions, 27 deletions
diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c
index 6d787774d2a..acffabdfe51 100644
--- a/usr.sbin/lpr/lpc/cmds.c
+++ b/usr.sbin/lpr/lpc/cmds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmds.c,v 1.20 2009/10/27 23:59:52 deraadt Exp $ */
+/* $OpenBSD: cmds.c,v 1.21 2009/10/29 20:11:09 sobrado Exp $ */
/* $NetBSD: cmds.c,v 1.12 1997/10/05 15:12:06 mrg Exp $ */
/*
@@ -81,7 +81,7 @@ doabort(int argc, char **argv)
char prbuf[100];
if (argc == 1) {
- printf("Usage: abort {all | printer ...}\n");
+ printf("usage: abort {all | printer ...}\n");
return;
}
if (argc == 2 && strcmp(argv[1], "all") == 0) {
@@ -219,7 +219,7 @@ clean(int argc, char **argv)
char prbuf[100];
if (argc == 1) {
- printf("Usage: clean {all | printer ...}\n");
+ printf("usage: clean {all | printer ...}\n");
return;
}
if (argc == 2 && strcmp(argv[1], "all") == 0) {
@@ -375,7 +375,7 @@ enable(int argc, char **argv)
char prbuf[100];
if (argc == 1) {
- printf("Usage: enable {all | printer ...}\n");
+ printf("usage: enable {all | printer ...}\n");
return;
}
if (argc == 2 && strcmp(argv[1], "all") == 0) {
@@ -443,7 +443,7 @@ disable(int argc, char **argv)
char prbuf[100];
if (argc == 1) {
- printf("Usage: disable {all | printer ...}\n");
+ printf("usage: disable {all | printer ...}\n");
return;
}
if (argc == 2 && strcmp(argv[1], "all") == 0) {
@@ -521,7 +521,7 @@ down(int argc, char **argv)
char prbuf[100];
if (argc == 1) {
- printf("Usage: down {all | printer} [message ...]\n");
+ printf("usage: down {all | printer} [message ...]\n");
return;
}
if (strcmp(argv[1], "all") == 0) {
@@ -640,7 +640,7 @@ restart(int argc, char **argv)
char prbuf[100];
if (argc == 1) {
- printf("Usage: restart {all | printer ...}\n");
+ printf("usage: restart {all | printer ...}\n");
return;
}
if (argc == 2 && strcmp(argv[1], "all") == 0) {
@@ -684,7 +684,7 @@ startcmd(int argc, char **argv)
char prbuf[100];
if (argc == 1) {
- printf("Usage: start {all | printer ...}\n");
+ printf("usage: start {all | printer ...}\n");
return;
}
if (argc == 2 && strcmp(argv[1], "all") == 0) {
@@ -873,7 +873,7 @@ stop(int argc, char **argv)
char prbuf[100];
if (argc == 1) {
- printf("Usage: stop {all | printer ...}\n");
+ printf("usage: stop {all | printer ...}\n");
return;
}
if (argc == 2 && strcmp(argv[1], "all") == 0) {
@@ -958,7 +958,7 @@ topq(int argc, char **argv)
int status, changed;
if (argc < 3) {
- printf("Usage: topq printer [jobnum ...] [user ...]\n");
+ printf("usage: topq printer [jobnum ...] [user ...]\n");
return;
}
@@ -1123,7 +1123,7 @@ up(int argc, char **argv)
char prbuf[100];
if (argc == 1) {
- printf("Usage: up {all | printer ...}\n");
+ printf("usage: up {all | printer ...}\n");
return;
}
if (argc == 2 && strcmp(argv[1], "all") == 0) {
diff --git a/usr.sbin/lpr/lpc/lpc.8 b/usr.sbin/lpr/lpc/lpc.8
index 1f7728d5e5f..072d240b7d5 100644
--- a/usr.sbin/lpr/lpc/lpc.8
+++ b/usr.sbin/lpr/lpc/lpc.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: lpc.8,v 1.13 2007/05/31 19:20:25 jmc Exp $
+.\" $OpenBSD: lpc.8,v 1.14 2009/10/29 20:11:09 sobrado Exp $
.\" $NetBSD: lpc.8,v 1.14 2002/01/19 03:22:19 wiz Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)lpc.8 8.5 (Berkeley) 4/28/95
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: October 29 2009 $
.Dt LPC 8
.Os
.Sh NAME
@@ -78,29 +78,29 @@ Commands may be abbreviated;
the following is the list of recognized commands.
.Pp
.Bl -tag -width Ds -compact
-.It Ic \&? No [ Ar command Ar ... ]
-.It Ic help No [ Ar command Ar ... ]
+.It Ic \&? Op Ar command ...
+.It Ic help Op Ar command ...
Print a short description of each command specified in the argument list,
or, if no argument is given, a list of the recognized commands.
.Pp
-.It Ic abort No {\ all\ |\ printer\ }
+.It Ic abort No {all | printer ...}
Terminate an active spooling daemon on the local host immediately and
then disable printing (preventing new daemons from being started by
.Xr lpr 1 )
for the specified printers.
.Pp
-.It Ic clean No {\ all\ |\ printer\ }
+.It Ic clean No {all | printer ...}
Remove any temporary files, data files, and control files that cannot
be printed (i.e., do not form a complete printer job)
from the specified printer queue(s) on the local machine.
.Pp
-.It Ic disable No {\ all\ |\ printer\ }
+.It Ic disable No {all | printer ...}
Turn the specified printer queues off.
This prevents new printer jobs from being entered into the queue by
.Xr lpr 1 .
.Pp
-.It Xo Ic down No {\ all\ |\ printer\ } Ar message
-.Op Ar ...
+.It Xo Ic down No {all | printer}
+.Op Ar message ...
.Xc
Turn the specified printer queue off, disable printing and put
.Em message
@@ -112,7 +112,7 @@ This is normally used to take a printer down and let users know why.
.Xr lpq 1
will indicate the printer is down and print the status message.
.Pp
-.It Ic enable No {\ all\ |\ printer\ }
+.It Ic enable No {all | printer ...}
Enable spooling on the local queue for the listed printers.
This will allow
.Xr lpr 1
@@ -123,7 +123,7 @@ to put new jobs in the spool queue.
Exit from
.Nm lpc .
.Pp
-.It Ic restart No {\ all\ |\ printer\ }
+.It Ic restart No {all | printer ...}
Attempt to start a new printer daemon.
This is useful when some abnormal condition causes the daemon to
die unexpectedly, leaving jobs in the queue.
@@ -132,20 +132,23 @@ will report that there is no daemon present when this condition occurs.
If the user is the superuser,
try to abort the current daemon first (i.e., kill and restart a stuck daemon).
.Pp
-.It Ic start No {\ all\ |\ printer\ }
+.It Ic start No {all | printer ...}
Enable printing and start a spooling daemon for the listed printers.
.Pp
-.It Ic status No {\ all\ |\ printer\ }
+.It Ic status No {all | printer ...}
Display the status of daemons and queues on the local machine.
.Pp
-.It Ic stop No {\ all\ |\ printer\ }
+.It Ic stop No {all | printer ...}
Stop a spooling daemon after the current job completes and disable
printing.
.Pp
-.It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ]
+.It Xo Ic topq No printer
+.Op Ar jobnum ...
+.Op Ar user ...
+.Xc
Place the jobs in the order listed at the top of the printer queue.
.Pp
-.It Ic up No {\ all\ |\ printer\ }
+.It Ic up No {all | printer ...}
Enable everything and start a new printer daemon.
Undoes the effects of
.Ic down .