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