xref: /openbsd/bin/ksh/tty.h (revision a6445c1d)
1 /*	$OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $	*/
2 
3 /*
4 	tty.h -- centralized definitions for a variety of terminal interfaces
5 
6 	created by DPK, Oct. 1986
7 
8 	Rearranged to work with autoconf, added TTY_state, get_tty/set_tty
9 						Michael Rendell, May '94
10 
11 	last edit:	30-Jul-1987	D A Gwyn
12 */
13 
14 /* some useful #defines */
15 #ifdef EXTERN
16 # define I__(i) = i
17 #else
18 # define I__(i)
19 # define EXTERN extern
20 # define EXTERN_DEFINED
21 #endif
22 
23 #include <termios.h>
24 
25 EXTERN int		tty_fd I__(-1);	/* dup'd tty file descriptor */
26 EXTERN int		tty_devtty;	/* true if tty_fd is from /dev/tty */
27 EXTERN struct termios	tty_state;	/* saved tty state */
28 
29 extern void	tty_init(int);
30 extern void	tty_close(void);
31 
32 /* be sure not to interfere with anyone else's idea about EXTERN */
33 #ifdef EXTERN_DEFINED
34 # undef EXTERN_DEFINED
35 # undef EXTERN
36 #endif
37 #undef I__
38