2023-04-09 09:23:57 +00:00
|
|
|
/* bits/termios.h: Terminal control definitions. */
|
|
|
|
|
|
|
|
#ifndef _BITS_TERMIOS_H
|
|
|
|
#define _BITS_TERMIOS_H
|
|
|
|
|
2023-07-13 18:33:20 +00:00
|
|
|
#include <bits/fixed-size-types.h>
|
|
|
|
|
2023-04-09 09:23:57 +00:00
|
|
|
typedef long tcflag_t;
|
2023-07-13 18:33:20 +00:00
|
|
|
typedef char cc_t;
|
|
|
|
|
|
|
|
#define NCCS 4
|
|
|
|
|
|
|
|
#define VEOF 0
|
|
|
|
#define VERASE 1
|
|
|
|
#define VINTR 2
|
|
|
|
#define VQUIT 3
|
2023-04-09 09:23:57 +00:00
|
|
|
|
|
|
|
// VERY incomplete termios structure.
|
|
|
|
struct termios
|
|
|
|
{
|
|
|
|
tcflag_t c_lflag;
|
2023-07-13 18:33:20 +00:00
|
|
|
cc_t c_cc[NCCS];
|
2023-04-09 09:23:57 +00:00
|
|
|
};
|
|
|
|
|
2023-07-12 20:09:28 +00:00
|
|
|
struct winsize
|
|
|
|
{
|
2023-07-13 18:33:20 +00:00
|
|
|
__u16_t ws_row;
|
|
|
|
__u16_t ws_col;
|
|
|
|
__u16_t ws_xpixel;
|
|
|
|
__u16_t ws_ypixel;
|
2023-07-12 20:09:28 +00:00
|
|
|
};
|
|
|
|
|
2023-04-09 09:23:57 +00:00
|
|
|
// Values for c_lflag.
|
|
|
|
#define ECHO 1
|
2023-07-12 11:49:37 +00:00
|
|
|
#define TOSTOP 2
|
2023-07-13 18:33:20 +00:00
|
|
|
#define ECHOCTL 4
|
|
|
|
#define ISIG 8
|
|
|
|
#define ICANON 16
|
|
|
|
#define ECHOE 32
|
|
|
|
#define NOFLSH 64
|
2023-04-09 09:23:57 +00:00
|
|
|
|
|
|
|
// termios ioctl() requests.
|
|
|
|
#define TCGETS 0
|
|
|
|
#define TCSETS 1
|
2023-07-12 11:49:37 +00:00
|
|
|
#define TIOCSPGRP 2
|
2023-07-12 17:23:06 +00:00
|
|
|
#define TIOCGPGRP 3
|
2023-07-12 20:09:28 +00:00
|
|
|
#define TIOCGWINSZ 4
|
2023-09-16 09:46:52 +00:00
|
|
|
#define TIOCGPTN 5
|
2023-10-14 18:41:34 +00:00
|
|
|
#define TIOCSCTTY 6
|
2023-04-09 09:23:57 +00:00
|
|
|
|
|
|
|
#endif
|