home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixlib36d
/
clib
/
h
/
termio
< prev
next >
Wrap
Text File
|
1994-02-26
|
4KB
|
183 lines
/* termio.h (c) Copyright 1990 H.Rogers */
#ifndef __TERMIO_H
#define __TERMIO_H
#ifdef __cplusplus
extern "C" {
#endif
#define NCC 16
#define SSPEED 7
struct termio
{
unsigned short c_iflag; /* input modes */
unsigned short c_oflag; /* output modes */
unsigned short c_cflag; /* control modes */
unsigned short c_lflag; /* line discipline modes */
char c_line; /* line discipline */
unsigned char c_cc[NCC]; /* control chars */
};
#define TCGETA 00001
#define TCSETA 00002
#define TCSETAW 00006
#define TCSETAF 00006
#define TCSBRK 00010
#define TCFLSH 00004
#define TCXONC 0
#define TCGETS 00001
#define TCSETS 00002
#define TCSETSW 00006
#define TCSETSF 00006
#define TCSNDBRK 00010
#define TCDRAIN 00004
struct winsize
{
unsigned short ws_row; /* rows in characters */
unsigned short ws_col; /* columns in characters */
unsigned short ws_xpixel; /* horizontal size in pixels */
unsigned short ws_ypixel; /* vertical size in pixels */
};
#define TIOCGWINSZ 00100
#define TIOCSWINSZ 00200
#define VINTR 0
#define VQUIT 1 /* only generated from within read() */
#define VERASE 2
#define VKILL 3
#define VEOF 4
#define VEOT 4
#define VMIN 4
#define VEOL 5
#define VTIME 5
#define VEOL2 6
#define VSWTCH 7
#define VSTART 8 /* unimplemented */
#define VSTOP 9 /* unimplemented */
#define VSUSP 10 /* unimplemented */
#define VREPRINT 12
#define VDISCARD 13 /* unimplemented */
#define VWERASE 14
#define VLNEXT 15
#define CINTR '\003' /* ^C */
#define CQUIT '\034' /* ^\ */
#define CERASE '\177' /* ^? */
#define CKILL '\025' /* ^U */
#define CEOF '\004' /* ^D */
#define CEOT '\004' /* ^D */
#define CEOL '\000'
#define CEOL2 '\000'
#define CSWTCH '\000'
#define CSTART '\021' /* ^Q */
#define CSTOP '\023' /* ^S */
#define CSUSP '\032' /* ^Z */
#define CREPRINT '\022' /* ^R */
#define CDISCARD '\017' /* ^O */
#define CWERASE '\027' /* ^W */
#define CLNEXT '\026' /* ^V */
#define IGNBRK 0x00000001
#define BRKINT 0x00000002
#define IGNPAR 0x00000004
#define PARMRK 0x00000008
#define INPCK 0x00000010
#define ISTRIP 0x00000020
#define INLCR 0x00000040
#define IGNCR 0x00000080
#define ICRNL 0x00000100
#define IUCLC 0x00000200
#define IXON 0x00000400
#define IXANY 0x00000800
#define IXOFF 0x00001000
#define IMAXBEL 0x00002000
#define OPOST 0x00000001
#define OLCUC 0x00000002
#define ONLCR 0x00000004
#define OCRNL 0x00000008
#define ONOCR 0x00000010
#define ONLRET 0x00000020
#define OFILL 0x00000040
#define OFDEL 0x00000080
#define NLDLY 0x00000100
#define NL0 0
#define NL1 0x00000100
#define CRDLY 0x00000600
#define CR0 0
#define CR1 0x00000200
#define CR2 0x00000400
#define CR3 0x00000600
#define TABDLY 0x00001800
#define TAB0 0
#define TAB1 0x00000800
#define TAB2 0x00001000
#define TAB3 0x00001800
#define XTABS TAB3
#define BSDLY 0x00002000
#define BS0 0
#define BS1 0x00002000
#define VTDLY 0x00004000
#define VT0 0
#define VT1 0x00004000
#define FFDLY 0x00008000
#define FF0 0
#define FF1 0x00008000
#define CBAUD 0x0000000f
#define CIBAUD 0x000000f0
#define IBSHIFT 4
/* impossible h/ware speed changes are ignored */
#define B0 0
#define B50 0x00000001
#define B75 0x00000002
#define B110 0x00000003
#define B134 0x00000004
#define B150 0x00000005
#define B200 0x00000006
#define B300 0x00000007
#define B600 0x00000008
#define B1200 0x00000009
#define B1800 0x0000000a
#define B2400 0x0000000b
#define B4800 0x0000000c
#define B9600 0x0000000d
#define B19200 0x0000000e
#define B38400 0x0000000f
#define CSIZE 0x00000300
#define CS5 0
#define CS6 0x00000100
#define CS7 0x00000200
#define CS8 0x00000300
#define CSTOPB 0x00000400
#define CREAD 0x00000800
#define PARENB 0x00001000
#define PARODD 0x00002000
#define HUPCL 0x00004000
#define CLOCAL 0x00008000
#define ISIG 0x00000001
#define ICANON 0x00000002
#define XCASE 0x00000004
#define ECHO 0x00000008
#define ECHOE 0x00000010
#define ECHOK 0x00000020
#define ECHONL 0x00000040
#define NOFLSH 0x00000080
#ifdef __cplusplus
}
#endif
#endif