xref: /titanic_41/usr/src/cmd/lp/lib/printers/llib-llpprt (revision 355b4669e025ff377602b6fc7caaf30dbc218371)
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/* LINTLIBRARY */
23/* PROTOLIB1 */
24
25/*
26 * Copyright (c) 1998 by Sun Microsystems, Inc.
27 * All rights reserved.
28 */
29
30/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31/*	  All Rights Reserved  	*/
32
33#pragma ident	"%Z%%M%	%I%	%E% SMI"
34
35#include "../../include/lp.h"
36
37typedef struct PRINTER {
38	char   *name;		/* name of printer (redundant) */
39	unsigned short banner;	/* banner page conditions */
40	SCALED cpi;             /* default character pitch */
41	char   **char_sets;     /* list of okay char-sets/print-wheels */
42	char   **input_types;   /* list of types acceptable to printer */
43	char   *device;         /* printer port full path name */
44	char   *dial_info;      /* system name or phone # for dial-up */
45	char   *fault_rec;      /* printer fault recovery procedure */
46	char   *interface;      /* interface program full path name */
47	SCALED lpi;             /* default line pitch */
48	SCALED plen;            /* default page length */
49	unsigned short login;	/* is/isn't a login terminal */
50	char   *printer_type;   /* Terminfo look-up value (obsolete) */
51	char   *remote;         /* remote machine!printer-name */
52	char   *speed;          /* baud rate for connection */
53	char   *stty;           /* space separated list of stty options */
54	SCALED pwid;            /* default page width */
55	char   *description;	/* comment about printer */
56	FALERT fault_alert;	/* how to alert on printer fault */
57	short  daisy;           /* 1/0 - printwheels/character-sets */
58#if     defined(CAN_DO_MODULES)
59	char   **modules;	/* streams modules to push */
60#endif
61	char   **printer_types; /* Terminfo look-up values */
62	char	**options;	/* space separated list of undefined -o options */
63
64	/*
65	 * Adding new members to this structure? Check out
66	 * cmd/lpadmin/do_printer.c, where we initialize
67	 * each new printer structure.
68	 */
69}			PRINTER;
70
71typedef struct PWHEEL {
72	char   *name;		/* name of print wheel */
73	FALERT alert;		/* how to alert when mount needed */
74}			PWHEEL;
75
76extern unsigned long	badprinter,
77			ignprinter;
78PRINTER *	getprinter ( char * );
79
80PWHEEL *	getpwheel ( char * );
81
82char *		getdefault ( void );
83
84int		putprinter ( char *, PRINTER *);
85int		delprinter ( char * );
86int		putdefault ( char * );
87int		deldefault ( void );
88int		putpwheel ( char * , PWHEEL * );
89int		delpwheel ( char * );
90int		okprinter ( char * , PRINTER * , int );
91
92unsigned long	chkprinter (char *, char *, char *, char *, char *, char *);
93
94void		freeprinter ( PRINTER * );
95void		freepwheel ( PWHEEL * );
96
97char *	getpentry(char *, int);
98
99
100