-
Notifications
You must be signed in to change notification settings - Fork 57
/
unixterm.h
49 lines (39 loc) · 1012 Bytes
/
unixterm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef __UNIXTERM_H
#define __UNIXTERM_H
#include <stdint.h>
#pragma pack(push, 1)
struct unixtermios {
uint16_t c_iflag;
uint16_t c_oflag;
uint16_t c_cflag;
uint16_t c_lflag;
char c_line;
uint8_t c_cc[8];
};
#pragma pack(pop)
#define UNIX_VMIN 4
#define UNIX_VTIME 5
#define UNIX_VSWITCH 7
#define UNIX_VMAGIC UNIX_VSWITCH
#define VMAGIC VSWITCH
// I've only figured out the parameters used by cfmakeraw()
#define UNIX_IGNBRK 0x0001
#define UNIX_BRKINT 0x0002
#define UNIX_PARMRK 0x0008
#define UNIX_ISTRIP 0x0020
#define UNIX_INLCR 0x0040
#define UNIX_IGNCR 0x0080
#define UNIX_ICRNL 0x0100
#define UNIX_IXON 0x0400
#define UNIX_OPOST 0x0001
#define UNIX_ECHO 0x0008
#define UNIX_ECHONL 0x0040
#define UNIX_ICANON 0x0002
#define UNIX_ISIG 0x0001
#define UNIX_IEXTEN 0x8000
#define UNIX_CSIZE 0x0030
#define UNIX_PARENB 0x0100
#define UNIX_CS8 0x0030
// These are used by set_raw_mode()
#define UNIX_TABDLY 0x1800
#endif