xref: /csrg-svn/bin/stty/stty.h (revision 50007)
1 /*-
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)stty.h	5.2 (Berkeley) 06/05/91
8  */
9 
10 #include <sys/ioctl.h>
11 #include <termios.h>
12 
13 struct info {
14 	int fd;					/* file descriptor */
15 	int ldisc;				/* line discipline */
16 	int off;				/* turn off */
17 	int set;				/* need set */
18 	int wset;				/* need window set */
19 	char *arg;				/* argument */
20 	struct termios t;			/* terminal info */
21 	struct winsize win;			/* window info */
22 };
23 
24 struct key {
25 	char *name;				/* name */
26 	void (*f) __P((struct info *));		/* function */
27 #define	F_NEEDARG	0x01			/* needs an argument */
28 #define	F_OFFOK		0x02			/* can turn off */
29 	int flags;
30 };
31 
32 struct modes {
33 	char *name;
34 	long set;
35 	long unset;
36 };
37 
38 struct cchar {
39 	char *name;
40 	int sub;
41 	u_char def;
42 };
43 
44 enum FMT { NOTSET, GFLAG, BSD, POSIX };
45 
46 #define	LINELENGTH	72
47