2021-08-15 00:16:33 +00:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_CALLS_TTYDEFAULTS_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_CALLS_TTYDEFAULTS_H_
|
2022-12-17 08:39:52 +00:00
|
|
|
#include "libc/sysv/consts/baud.internal.h"
|
2021-08-15 00:16:33 +00:00
|
|
|
#include "libc/sysv/consts/termios.h"
|
|
|
|
|
|
|
|
#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
|
|
|
|
#define TTYDEF_OFLAG (OPOST | ONLCR | XTABS)
|
|
|
|
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE | ECHOKE | ECHOCTL)
|
|
|
|
#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
|
|
|
|
#define TTYDEF_SPEED (B9600)
|
|
|
|
|
|
|
|
#define CTRL(x) ((x) ^ 0100)
|
|
|
|
#define CEOF CTRL('D')
|
|
|
|
#define CERASE CTRL('?')
|
|
|
|
#define CINTR CTRL('C')
|
|
|
|
#define CKILL CTRL('U')
|
|
|
|
#define CQUIT CTRL('\\')
|
|
|
|
#define CSUSP CTRL('Z')
|
|
|
|
#define CDSUSP CTRL('Y')
|
|
|
|
#define CSTART CTRL('Q')
|
|
|
|
#define CSTOP CTRL('S')
|
|
|
|
#define CLNEXT CTRL('V')
|
|
|
|
#define CDISCARD CTRL('O')
|
|
|
|
#define CWERASE CTRL('W')
|
|
|
|
#define CREPRINT CTRL('R')
|
|
|
|
#define CEOT CEOF
|
|
|
|
#define CBRK CEOL
|
|
|
|
#define CRPRNT CREPRINT
|
|
|
|
#define CFLUSH CDISCARD
|
2021-08-18 21:21:30 +00:00
|
|
|
#define CEOL 255
|
2021-08-15 00:16:33 +00:00
|
|
|
#define CMIN 1
|
|
|
|
#define CTIME 0
|
|
|
|
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_CALLS_TTYDEFAULTS_H_ */
|