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
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.
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]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
30 #pragma ident "%Z%%M% %I% %E% SMI"
37 extern char *getenv();
44 main(int argc
, char *argv
[])
46 static char not_set
[10] = "H V W L S";
50 char *TERM
= getenv("TERM");
53 if (!TERM
|| !*TERM
|| tidbit(TERM
, (char *)0) == -1)
57 * Very simple calling sequence:
59 * lpset horz-pitch vert-pitch width length char-set
61 * The first four can be scaled with 'i' (inches) or
62 * 'c' (centimeters). A pitch scaled with 'i' is same
63 * as an unscaled pitch.
64 * Blank arguments will skip the corresponding setting.
72 switch (set_pitch(argv
[1], 'H', 1)) {
86 switch (set_pitch(argv
[2], 'V', 1)) {
100 switch (set_size(argv
[3], 'W', 1)) {
114 switch (set_size(argv
[4], 'L', 1)) {
128 switch (set_charset(argv
[5], 1, TERM
)) {
141 fprintf (stderr
, "%s\n", not_set
);