1991-10-04 14:34:29 +00:00
|
|
|
/* $Header$ */
|
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
|
|
|
/* Data structures for ioctl/stty/gtty, sufficient for ACK libraries */
|
1987-03-26 17:36:49 +00:00
|
|
|
|
1991-10-25 14:44:21 +00:00
|
|
|
#ifndef _SGTTY_H
|
|
|
|
#define _SGTTY_H
|
|
|
|
|
1991-10-04 14:34:29 +00:00
|
|
|
struct sgttyb {
|
|
|
|
char sg_ispeed; /* input speed (not used) */
|
|
|
|
char sg_ospeed; /* output speed (not used) */
|
|
|
|
char sg_erase; /* erase character */
|
|
|
|
char sg_kill; /* kill character */
|
1991-12-02 15:55:49 +00:00
|
|
|
#if defined(__USG) && !defined(_XENIX)
|
1991-10-04 14:34:29 +00:00
|
|
|
int sg_flags; /* mode flags */
|
1987-04-01 15:37:14 +00:00
|
|
|
#else
|
1991-10-04 14:34:29 +00:00
|
|
|
short sg_flags; /* mode flags */
|
1987-04-01 15:37:14 +00:00
|
|
|
#endif
|
1991-10-04 14:34:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct tchars {
|
|
|
|
char t_intrc; /* SIGINT char */
|
|
|
|
char t_quitc; /* SIGQUIT char */
|
|
|
|
char t_startc; /* start output (initially CTRL-Q) */
|
|
|
|
char t_stopc; /* stop output (initially CTRL-S) */
|
|
|
|
char t_eofc; /* EOF (initially CTRL-D) */
|
|
|
|
char t_brkc; /* input delimiter (like nl) */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Fields in t_flags. */
|
|
|
|
#define ALLDELAY 0177400
|
|
|
|
|
|
|
|
#define BSDELAY 0100000
|
|
|
|
# define BS0 0000000
|
|
|
|
# define BS1 0100000
|
1987-04-01 15:37:14 +00:00
|
|
|
|
1991-10-04 14:34:29 +00:00
|
|
|
#define VTDELAY 0040000
|
|
|
|
# define FF0 0000000
|
|
|
|
# define FF1 0040000
|
|
|
|
|
|
|
|
#define CRDELAY 0030000
|
|
|
|
# define CR0 0000000
|
|
|
|
# define CR1 0010000
|
|
|
|
# define CR2 0020000
|
|
|
|
# define CR3 0030000
|
|
|
|
|
1991-12-02 15:55:49 +00:00
|
|
|
#if defined(__USG) && !defined(_XENIX)
|
|
|
|
#define XTABS 0000002 /* do tab expansion */
|
|
|
|
#else
|
1991-10-04 14:34:29 +00:00
|
|
|
#define XTABS 0006000 /* do tab expansion */
|
1991-12-02 15:55:49 +00:00
|
|
|
#endif
|
1991-10-04 14:34:29 +00:00
|
|
|
|
|
|
|
#define TBDELAY 0006000
|
|
|
|
# define TAB0 0000000
|
|
|
|
# define TAB1 0002000
|
|
|
|
# define TAB2 0004000
|
|
|
|
|
|
|
|
#define NLDELAY 0001400
|
|
|
|
# define NL0 0000000
|
|
|
|
# define NL1 0000400
|
|
|
|
# define NL2 0001000
|
|
|
|
# define NL3 0001400
|
|
|
|
|
|
|
|
#define ANYP 0000300
|
|
|
|
#define EVENP 0000200
|
|
|
|
#define ODDP 0000100
|
|
|
|
|
|
|
|
#define RAW 0000040 /* enable raw mode */
|
|
|
|
#define CRMOD 0000020 /* map lf to cr + lf */
|
|
|
|
#define ECHO 0000010 /* echo input */
|
|
|
|
#define LCASE 0000004
|
|
|
|
#define CBREAK 0000002 /* enable cbreak mode */
|
1991-12-02 15:55:49 +00:00
|
|
|
#if defined(__BSD4_2) || defined(_XENIX)
|
1991-10-04 14:34:29 +00:00
|
|
|
#define TANDEM 0000001
|
1991-12-02 15:55:49 +00:00
|
|
|
#else
|
|
|
|
#define HUPCL 0000001 /* unused ??? */
|
|
|
|
#endif
|
1991-12-03 10:48:57 +00:00
|
|
|
#undef COOKED 0000000 /* neither CBREAK nor RAW */
|
1991-10-04 14:34:29 +00:00
|
|
|
|
|
|
|
#ifdef __BDS4_2
|
|
|
|
#define TIOCGETP (('t'<<8) | 8 | (6 << 16) | 0x40000000)
|
|
|
|
#define TIOCSETP (('t'<<8) | 9 | (6 << 16) | 0x80000000)
|
|
|
|
#define TIOCSETN (('t'<<8) | 10 | (6 << 16) | 0x80000000)
|
|
|
|
#define TIOCEXCL (('t'<<8) | 13 | 0x20000000)
|
|
|
|
#define TIOCNXCL (('t'<<8) | 14 | 0x20000000)
|
|
|
|
#define TIOCHPCL (('t'<<8) | 2 | 0x20000000)
|
|
|
|
#define TIOCGETC (('t'<<8) | 18 | (6 << 16) | 0x40000000)
|
|
|
|
#define TIOCSETC (('t'<<8) | 17 | (6 << 16) | 0x80000000)
|
1987-03-26 17:36:49 +00:00
|
|
|
#else
|
1991-10-04 14:34:29 +00:00
|
|
|
#define TIOCGETP (('t'<<8) | 8)
|
|
|
|
#define TIOCSETP (('t'<<8) | 9)
|
|
|
|
#define TIOCSETN (('t'<<8) | 10)
|
|
|
|
#define TIOCEXCL (('t'<<8) | 13)
|
|
|
|
#define TIOCNXCL (('t'<<8) | 14)
|
|
|
|
#define TIOCHPCL (('t'<<8) | 2)
|
|
|
|
#define TIOCGETC (('t'<<8) | 18)
|
|
|
|
#define TIOCSETC (('t'<<8) | 17)
|
1987-03-26 17:36:49 +00:00
|
|
|
#endif
|
1991-10-04 14:34:29 +00:00
|
|
|
|
|
|
|
#define B0 0
|
|
|
|
#define B50 1
|
|
|
|
#define B75 2
|
|
|
|
#define B110 3
|
|
|
|
#define B134 4
|
|
|
|
#define B150 5
|
|
|
|
#define B200 6
|
|
|
|
#define B300 7
|
|
|
|
#define B600 8
|
|
|
|
#define B1200 9
|
|
|
|
#define B1800 10
|
|
|
|
#define B2400 11
|
|
|
|
#define B4800 12
|
|
|
|
#define B9600 13
|
|
|
|
#define EXTA 14
|
|
|
|
#define EXTB 15
|
1991-10-25 14:44:21 +00:00
|
|
|
|
|
|
|
#endif /* _SGTTY_H */
|