xref: /illumos-gate/usr/src/cmd/lp/cmd/lpadmin/usage.c (revision 543a8da84d26ec70222ecd1638b72c1e6c763275)
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 #include "lp.h"
31 #include "printers.h"
32 #include <locale.h>
33 
34 /**
35  ** usage() - PRINT COMMAND USAGE
36  **/
37 
38 void			usage ()
39 {
40 #if	defined(CAN_DO_MODULES)
41 	(void) printf (gettext(
42 "usage:\n"
43 "\n"
44 "  (add printer)\n\n"
45 "    lpadmin -p printer {-v device | -U dial-info | -s system[!printer]} [options]\n"
46 "	[-s system[!printer]]			(remote system/printer name)\n"
47 "	[-v device]				(printer port name)\n"
48 "	[-U dial-info]				(phone # or sys. name)\n"
49 "	[-T type-list]				(printer types)\n"
50 "	[-c class | -r class]			(add to/del from class)\n"
51 "	[-A mail|write|quiet|showfault|cmd [-W interval]]\n"
52 "						(alert definition)\n"
53 "	[-A none]				(no alerts)\n"
54 "	[-A list]				(examine alert)\n"
55 "	[-D comment]				(printer description)\n"
56 "	[-e printer | -i interface | -m model]	(interface program)\n"
57 "	[-l | -h]				(is/isn't login tty)\n"
58 "	[-f allow:forms-list | deny:forms-list]	(forms allowed)\n"
59 "	[-u allow:user-list | deny:user-list]	(who's allowed to use)\n"
60 "	[-S char-set-maps | print-wheels]	(list of avail. fonts)\n"
61 "	[-I content-type-list]			(file types accepted\n"
62 "	[-F beginning|continue|wait]		(fault recovery)\n"
63 "	[-o stty='stty-options']		(port characteristics)\n"
64 "	[-o cpi=scaled-number]			(character pitch)\n"
65 "	[-o lpi=scaled-number]			(line pitch)\n"
66 "	[-o width=scaled-number]		(page width)\n"
67 "	[-o length=scaled-number]		(page length)\n"
68 "	[-o nobanner]				(allow no banner)\n\n"
69 "	[-P paper-list]				(add paper type)\n"
70 "	[-P ~paper-list]			(remove paper type)\n"
71 "	[-t number-of-trays]			(number of paper trays)\n"
72 "	[-H module,...|keep|default|none]	(STREAMS modules to push)\n\n"
73 "  (delete printer or class)\n"
74 "    lpadmin -x printer-or-class\n\n"
75 "  (define default destination)\n"
76 "    lpadmin -d printer-or-class\n\n"
77 "  (mount form, printwheel)\n"
78 "    lpadmin -p printer -M {options}\n"
79 "	[-f form [-a [-o filebreak]] [-t tray-number]]\n"
80 "						(mount (align) form (on tray))\n"
81 "	[-S print-wheel]			(mount print wheel)\n\n"
82 "  (define print-wheel mount alert)\n"
83 "    lpadmin -S print-wheel {options}\n"
84 "	[-A mail|write|quiet|cmd [-W interval] [-Q queue-size]]\n"
85 "	[-A none]				(no alerts)\n"
86 "	[-A list]				(examine alert)\n "));
87 #else
88 	(void) printf (gettext(
89 "usage:\n"
90 "\n"
91 "  (add printer)\n\n"
92 "    lpadmin -p printer {-v device | -U dial-info | -s system[!printer]} [options]\n"
93 "	[-s system[!printer]]			(remote system/printer name)\n"
94 "	[-v device]				(printer port name)\n"
95 "	[-U dial-info]				(phone # or sys. name)\n"
96 "	[-T type-list]				(printer types)\n"
97 "	[-c class | -r class]			(add to/del from class)\n"
98 "	[-A mail|write|quiet|showfault|cmd [-W interval]]\n"
99 "						(alert definition)\n"
100 "	[-A none]				(no alerts)\n"
101 "	[-A list]				(examine alert)\n"
102 "	[-D comment]				(printer description)\n"
103 "	[-e printer | -i interface | -m model]	(interface program)\n"
104 "	[-l | -h]				(is/isn't login tty)\n"
105 "	[-f allow:forms-list | deny:forms-list]	(forms allowed)\n"
106 "	[-u allow:user-list | deny:user-list]	(who's allowed to use)\n"
107 "	[-S char-set-maps | print-wheels]	(list of avail. fonts)\n"
108 "	[-I content-type-list]			(file types accepted\n"
109 "	[-F beginning|continue|wait]		(fault recovery)\n"
110 "	[-o stty='stty-options']		(port characteristics)\n"
111 "	[-o cpi=scaled-number]			(character pitch)\n"
112 "	[-o lpi=scaled-number]			(line pitch)\n"
113 "	[-o width=scaled-number]		(page width)\n"
114 "	[-o length=scaled-number]		(page length)\n"
115 "	[-o nobanner]				(allow no banner)\n\n"
116 "	[-P paper-list]				(add paper type)\n"
117 "	[-P ~paper-list]			(remove paper type)\n"
118 "	[-t number-of-trays]			(number of paper trays)\n"
119 "  (delete printer or class)\n"
120 "    lpadmin -x printer-or-class\n\n"
121 "  (define default destination)\n"
122 "    lpadmin -d printer-or-class\n\n"
123 "  (mount form, printwheel)\n"
124 "    lpadmin -p printer -M {options}\n"
125 "	[-f form [-a [-o filebreak]] [-t tray-number]]\n"
126 "						(mount (align) form (on tray))\n"
127 "	[-S print-wheel]			(mount print wheel)\n\n"
128 "  (define print-wheel mount alert)\n"
129 "    lpadmin -S print-wheel {options}\n"
130 "	[-A mail|write|quiet|cmd [-W interval] [-Q queue-size]]\n"
131 "	[-A none]				(no alerts)\n"
132 "	[-A list]				(examine alert)\n "));
133 #endif
134 
135 	return;
136 }
137