xref: /illumos-gate/usr/src/cmd/lp/cmd/lpadmin/usage.c (revision f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.9	*/
32 
33 #include "lp.h"
34 #include "printers.h"
35 #include <locale.h>
36 
37 /**
38  ** usage() - PRINT COMMAND USAGE
39  **/
40 
41 void			usage ()
42 {
43 #if	defined(CAN_DO_MODULES)
44 	(void) printf (gettext(
45 "usage:\n"
46 "\n"
47 "  (add printer)\n\n"
48 "    lpadmin -p printer {-v device | -U dial-info | -s system[!printer]} [options]\n"
49 "	[-s system[!printer]]			(remote system/printer name)\n"
50 "	[-v device]				(printer port name)\n"
51 "	[-U dial-info]				(phone # or sys. name)\n"
52 "	[-T type-list]				(printer types)\n"
53 "	[-c class | -r class]			(add to/del from class)\n"
54 "	[-A mail|write|quiet|showfault|cmd [-W interval]]\n"
55 "						(alert definition)\n"
56 "	[-A none]				(no alerts)\n"
57 "	[-A list]				(examine alert)\n"
58 "	[-D comment]				(printer description)\n"
59 "	[-e printer | -i interface | -m model]	(interface program)\n"
60 "	[-l | -h]				(is/isn't login tty)\n"
61 "	[-f allow:forms-list | deny:forms-list]	(forms allowed)\n"
62 "	[-u allow:user-list | deny:user-list]	(who's allowed to use)\n"
63 "	[-S char-set-maps | print-wheels]	(list of avail. fonts)\n"
64 "	[-I content-type-list]			(file types accepted\n"
65 "	[-F beginning|continue|wait]		(fault recovery)\n"
66 "	[-o stty='stty-options']		(port characteristics)\n"
67 "	[-o cpi=scaled-number]			(character pitch)\n"
68 "	[-o lpi=scaled-number]			(line pitch)\n"
69 "	[-o width=scaled-number]		(page width)\n"
70 "	[-o length=scaled-number]		(page length)\n"
71 "	[-o nobanner]				(allow no banner)\n\n"
72 "	[-P paper-list]				(add paper type)\n"
73 "	[-P ~paper-list]			(remove paper type)\n"
74 "	[-t number-of-trays]			(number of paper trays)\n"
75 "	[-H module,...|keep|default|none]	(STREAMS modules to push)\n\n"
76 "  (delete printer or class)\n"
77 "    lpadmin -x printer-or-class\n\n"
78 "  (define default destination)\n"
79 "    lpadmin -d printer-or-class\n\n"
80 "  (mount form, printwheel)\n"
81 "    lpadmin -p printer -M {options}\n"
82 "	[-f form [-a [-o filebreak]] [-t tray-number]]\n"
83 "						(mount (align) form (on tray))\n"
84 "	[-S print-wheel]			(mount print wheel)\n\n"
85 "  (define print-wheel mount alert)\n"
86 "    lpadmin -S print-wheel {options}\n"
87 "	[-A mail|write|quiet|cmd [-W interval] [-Q queue-size]]\n"
88 "	[-A none]				(no alerts)\n"
89 "	[-A list]				(examine alert)\n "));
90 #else
91 	(void) printf (gettext(
92 "usage:\n"
93 "\n"
94 "  (add printer)\n\n"
95 "    lpadmin -p printer {-v device | -U dial-info | -s system[!printer]} [options]\n"
96 "	[-s system[!printer]]			(remote system/printer name)\n"
97 "	[-v device]				(printer port name)\n"
98 "	[-U dial-info]				(phone # or sys. name)\n"
99 "	[-T type-list]				(printer types)\n"
100 "	[-c class | -r class]			(add to/del from class)\n"
101 "	[-A mail|write|quiet|showfault|cmd [-W interval]]\n"
102 "						(alert definition)\n"
103 "	[-A none]				(no alerts)\n"
104 "	[-A list]				(examine alert)\n"
105 "	[-D comment]				(printer description)\n"
106 "	[-e printer | -i interface | -m model]	(interface program)\n"
107 "	[-l | -h]				(is/isn't login tty)\n"
108 "	[-f allow:forms-list | deny:forms-list]	(forms allowed)\n"
109 "	[-u allow:user-list | deny:user-list]	(who's allowed to use)\n"
110 "	[-S char-set-maps | print-wheels]	(list of avail. fonts)\n"
111 "	[-I content-type-list]			(file types accepted\n"
112 "	[-F beginning|continue|wait]		(fault recovery)\n"
113 "	[-o stty='stty-options']		(port characteristics)\n"
114 "	[-o cpi=scaled-number]			(character pitch)\n"
115 "	[-o lpi=scaled-number]			(line pitch)\n"
116 "	[-o width=scaled-number]		(page width)\n"
117 "	[-o length=scaled-number]		(page length)\n"
118 "	[-o nobanner]				(allow no banner)\n\n"
119 "	[-P paper-list]				(add paper type)\n"
120 "	[-P ~paper-list]			(remove paper type)\n"
121 "	[-t number-of-trays]			(number of paper trays)\n"
122 "  (delete printer or class)\n"
123 "    lpadmin -x printer-or-class\n\n"
124 "  (define default destination)\n"
125 "    lpadmin -d printer-or-class\n\n"
126 "  (mount form, printwheel)\n"
127 "    lpadmin -p printer -M {options}\n"
128 "	[-f form [-a [-o filebreak]] [-t tray-number]]\n"
129 "						(mount (align) form (on tray))\n"
130 "	[-S print-wheel]			(mount print wheel)\n\n"
131 "  (define print-wheel mount alert)\n"
132 "    lpadmin -S print-wheel {options}\n"
133 "	[-A mail|write|quiet|cmd [-W interval] [-Q queue-size]]\n"
134 "	[-A none]				(no alerts)\n"
135 "	[-A list]				(examine alert)\n "));
136 #endif
137 
138 	return;
139 }
140