xref: /illumos-gate/usr/src/cmd/lp/filter/postscript/postio/ifdef.h (revision 37e2cd25d56b334a2403f2540a0b0a1e6a40bcd1)
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 1996 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 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.2	*/
32 /*
33  *
34  * Conditional compilation definitions needed in ifdef.c and postio.c.
35  *
36  */
37 
38 
39 #ifdef SYSV
40 #include <termio.h>
41 #endif
42 
43 
44 #ifdef V9
45 #include <sys/filio.h>
46 #include <sys/ttyio.h>
47 
48 extern int	tty_ld;
49 #endif
50 
51 
52 #ifdef BSD4_2
53 #include <sgtty.h>
54 #include <sys/time.h>
55 #include <errno.h>
56 
57 #define FD_ZERO(s) (s) = 0
58 #define FD_SET(n,s) (s) |= 1 << (n)
59 
60 extern int	errno;
61 #endif
62 
63 
64 #ifdef DKHOST
65 #include <dk.h>
66 #include <sysexits.h>
67 
68 extern char	*dtnamer();
69 extern int	dkminor();
70 #endif
71 
72 
73 /*
74  *
75  * External variable declarations - most (if not all) are defined in postio.c and
76  * needed by the routines in ifdef.c.
77  *
78  */
79 
80 
81 extern char	*line;			/* printer is on this line */
82 extern int	ttyi;			/* input */
83 extern int	ttyo;			/* and output file descriptors */
84 extern FILE	*fp_log;		/* just for DKHOST stuff */
85 
86 extern char	mesg[];			/* exactly what came back on ttyi */
87 extern char	*endmesg;		/* one in front of last free slot in mesg */
88 extern int	next;			/* next character goes in mesg[next] */
89 
90 extern short	baudrate;		/* printer is running at this speed */
91 extern int	stopbits;		/* and expects this many stop bits */
92 extern int	interactive;		/* TRUE for interactive mode */
93 
94 extern int	canread;		/* allows reads */
95 extern int	canwrite;		/* and writes if TRUE */
96 
97