xref: /titanic_51/usr/src/cmd/lp/lib/printers/llib-llpprt (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate/*
2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate *
4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate * with the License.
8*7c478bd9Sstevel@tonic-gate *
9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate *
14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate *
20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate */
22*7c478bd9Sstevel@tonic-gate/* LINTLIBRARY */
23*7c478bd9Sstevel@tonic-gate/* PROTOLIB1 */
24*7c478bd9Sstevel@tonic-gate
25*7c478bd9Sstevel@tonic-gate/*
26*7c478bd9Sstevel@tonic-gate * Copyright (c) 1998 by Sun Microsystems, Inc.
27*7c478bd9Sstevel@tonic-gate * All rights reserved.
28*7c478bd9Sstevel@tonic-gate */
29*7c478bd9Sstevel@tonic-gate
30*7c478bd9Sstevel@tonic-gate/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31*7c478bd9Sstevel@tonic-gate/*	  All Rights Reserved  	*/
32*7c478bd9Sstevel@tonic-gate
33*7c478bd9Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
34*7c478bd9Sstevel@tonic-gate
35*7c478bd9Sstevel@tonic-gate#include "../../include/lp.h"
36*7c478bd9Sstevel@tonic-gate
37*7c478bd9Sstevel@tonic-gatetypedef struct PRINTER {
38*7c478bd9Sstevel@tonic-gate	char   *name;		/* name of printer (redundant) */
39*7c478bd9Sstevel@tonic-gate	unsigned short banner;	/* banner page conditions */
40*7c478bd9Sstevel@tonic-gate	SCALED cpi;             /* default character pitch */
41*7c478bd9Sstevel@tonic-gate	char   **char_sets;     /* list of okay char-sets/print-wheels */
42*7c478bd9Sstevel@tonic-gate	char   **input_types;   /* list of types acceptable to printer */
43*7c478bd9Sstevel@tonic-gate	char   *device;         /* printer port full path name */
44*7c478bd9Sstevel@tonic-gate	char   *dial_info;      /* system name or phone # for dial-up */
45*7c478bd9Sstevel@tonic-gate	char   *fault_rec;      /* printer fault recovery procedure */
46*7c478bd9Sstevel@tonic-gate	char   *interface;      /* interface program full path name */
47*7c478bd9Sstevel@tonic-gate	SCALED lpi;             /* default line pitch */
48*7c478bd9Sstevel@tonic-gate	SCALED plen;            /* default page length */
49*7c478bd9Sstevel@tonic-gate	unsigned short login;	/* is/isn't a login terminal */
50*7c478bd9Sstevel@tonic-gate	char   *printer_type;   /* Terminfo look-up value (obsolete) */
51*7c478bd9Sstevel@tonic-gate	char   *remote;         /* remote machine!printer-name */
52*7c478bd9Sstevel@tonic-gate	char   *speed;          /* baud rate for connection */
53*7c478bd9Sstevel@tonic-gate	char   *stty;           /* space separated list of stty options */
54*7c478bd9Sstevel@tonic-gate	SCALED pwid;            /* default page width */
55*7c478bd9Sstevel@tonic-gate	char   *description;	/* comment about printer */
56*7c478bd9Sstevel@tonic-gate	FALERT fault_alert;	/* how to alert on printer fault */
57*7c478bd9Sstevel@tonic-gate	short  daisy;           /* 1/0 - printwheels/character-sets */
58*7c478bd9Sstevel@tonic-gate#if     defined(CAN_DO_MODULES)
59*7c478bd9Sstevel@tonic-gate	char   **modules;	/* streams modules to push */
60*7c478bd9Sstevel@tonic-gate#endif
61*7c478bd9Sstevel@tonic-gate	char   **printer_types; /* Terminfo look-up values */
62*7c478bd9Sstevel@tonic-gate	char	**options;	/* space separated list of undefined -o options */
63*7c478bd9Sstevel@tonic-gate
64*7c478bd9Sstevel@tonic-gate	/*
65*7c478bd9Sstevel@tonic-gate	 * Adding new members to this structure? Check out
66*7c478bd9Sstevel@tonic-gate	 * cmd/lpadmin/do_printer.c, where we initialize
67*7c478bd9Sstevel@tonic-gate	 * each new printer structure.
68*7c478bd9Sstevel@tonic-gate	 */
69*7c478bd9Sstevel@tonic-gate}			PRINTER;
70*7c478bd9Sstevel@tonic-gate
71*7c478bd9Sstevel@tonic-gatetypedef struct PWHEEL {
72*7c478bd9Sstevel@tonic-gate	char   *name;		/* name of print wheel */
73*7c478bd9Sstevel@tonic-gate	FALERT alert;		/* how to alert when mount needed */
74*7c478bd9Sstevel@tonic-gate}			PWHEEL;
75*7c478bd9Sstevel@tonic-gate
76*7c478bd9Sstevel@tonic-gateextern unsigned long	badprinter,
77*7c478bd9Sstevel@tonic-gate			ignprinter;
78*7c478bd9Sstevel@tonic-gatePRINTER *	getprinter ( char * );
79*7c478bd9Sstevel@tonic-gate
80*7c478bd9Sstevel@tonic-gatePWHEEL *	getpwheel ( char * );
81*7c478bd9Sstevel@tonic-gate
82*7c478bd9Sstevel@tonic-gatechar *		getdefault ( void );
83*7c478bd9Sstevel@tonic-gate
84*7c478bd9Sstevel@tonic-gateint		putprinter ( char *, PRINTER *);
85*7c478bd9Sstevel@tonic-gateint		delprinter ( char * );
86*7c478bd9Sstevel@tonic-gateint		putdefault ( char * );
87*7c478bd9Sstevel@tonic-gateint		deldefault ( void );
88*7c478bd9Sstevel@tonic-gateint		putpwheel ( char * , PWHEEL * );
89*7c478bd9Sstevel@tonic-gateint		delpwheel ( char * );
90*7c478bd9Sstevel@tonic-gateint		okprinter ( char * , PRINTER * , int );
91*7c478bd9Sstevel@tonic-gate
92*7c478bd9Sstevel@tonic-gateunsigned long	chkprinter (char *, char *, char *, char *, char *, char *);
93*7c478bd9Sstevel@tonic-gate
94*7c478bd9Sstevel@tonic-gatevoid		freeprinter ( PRINTER * );
95*7c478bd9Sstevel@tonic-gatevoid		freepwheel ( PWHEEL * );
96*7c478bd9Sstevel@tonic-gate
97*7c478bd9Sstevel@tonic-gatechar *	getpentry(char *, int);
98*7c478bd9Sstevel@tonic-gate
99*7c478bd9Sstevel@tonic-gate
100