TacOS  0.2
 Tout Structures de données Fichiers Fonctions Variables Définitions de type Énumérations Macros
termios.h
Aller à la documentation de ce fichier.
1 
30 #ifndef _TERMIOS_H
31 #define _TERMIOS_H
32 
33 #include <sys/cdefs.h>
34 
35 __BEGIN_DECLS
36 
37 typedef unsigned int tcflag_t;
38 typedef unsigned int cc_t;
39 typedef unsigned int speed_t;
40 
41 #define NCCS 17
42 
43 #define TCGETS 1
44 #define TCSETS 2
45 
46 #define TCSANOW 1
48 /* c_iflag bits */
49 #define INLCR 0000100
50 #define IGNCR 0000200
51 #define ICRNL 0000400
52 #define IXON 0002000
53 #define IXOFF 0010000
55 /* c_oflag bits */
56 #define OPOST 0000001
57 #define ONLCR 0000004
58 #define OCRNL 0000010
59 #define ONOCR 0000020
60 #define ONLRET 0000040
62 /* c_lflag bits */
63 #define ISIG 0000001
64 #define ICANON 0000002
65 #define ECHO 0000010
66 #define ECHOE 0000020
67 #define ECHOK 0000040
68 #define ECHOCTL 0001000
69 #define ECHOKE 0004000
71 /* c_cflag bit meaning */
72 #define CSIZE 0000060
73 #define CS5 0000000
74 #define CS6 0000020
75 #define CS7 0000040
76 #define CS8 0000060
77 #define CSTOPB 0000100
78 #define CREAD 0000200
79 #define PARENB 0000400
80 #define PARODD 0001000
81 #define HUPCL 0002000
83 /* c_cc characters */
84 #define VINTR 0
85 #define VQUIT 1
86 #define VERASE 2
87 #define VKILL 3
88 #define VEOF 4
89 #define VTIME 5
90 #define VMIN 6
91 #define VSWTC 7
92 #define VSTART 8
93 #define VSTOP 9
94 #define VSUSP 10
95 #define VEOL 11
96 #define VREPRINT 12
97 #define VDISCARD 13
98 #define VWERASE 14
99 #define VLNEXT 15
100 #define VEOL2 16
102 struct termios {
103  tcflag_t c_iflag;
104  tcflag_t c_oflag;
105  tcflag_t c_cflag;
106  tcflag_t c_lflag;
107  cc_t c_cc[NCCS];
108  speed_t c_ispeed;
109 };
110 
120 int tcgetattr(int fd, struct termios *termios_p);
121 
133 int tcsetattr(int fd, int optional_actions, const struct termios *termios_p);
134 
135 speed_t cfgetispeed(const struct termios *termios_p);
136 int cfsetispeed(struct termios *termios_p, speed_t speed);
137 void cfmakeraw(struct termios *termios_p);
138 
139 __END_DECLS
140 
141 #endif
Definition: termios_types.h:98
int tcsetattr(int fd, int optional_actions, const struct termios *termios_p)
Change la configuration du terminal.
Definition: termios.c:39
int tcgetattr(int fd, struct termios *termios_p)
Récupère la configuration du terminal.
Definition: termios.c:34