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