mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-08 04:50:08 +03:00
6b849fc8b1
This allows us to get rid of an include to LibC/sys/ttydefaults.h in the Kernel TTY implementation. Also, move ttydefchars static const struct to another file called Kernel/API/ttydefaultschars.h, so it could be used too in the Kernel TTY implementation without the need to include anything from LibC.
40 lines
896 B
C
40 lines
896 B
C
/*
|
|
* Copyright (c) 2021, Daniel Bertalan <dani@danielbertalan.dev>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#define TTYDEF_IFLAG (ICRNL)
|
|
#define TTYDEF_OFLAG (OPOST | ONLCR)
|
|
#define TTYDEF_LFLAG_NOECHO (ISIG | ICANON)
|
|
#define TTYDEF_LFLAG_ECHO (TTYDEF_LFLAG_NOECHO | ECHO | ECHOE | ECHOK | ECHONL)
|
|
#define TTYDEF_LFLAG TTYDEF_LFLAG_ECHO
|
|
#define TTYDEF_CFLAG (CS8)
|
|
#define TTYDEF_SPEED (B9600)
|
|
|
|
#define CTRL(c) (c & 0x1F)
|
|
#define CINTR CTRL('c')
|
|
#define CQUIT 034
|
|
#define CERASE 010
|
|
#define CKILL CTRL('u')
|
|
#define CEOF CTRL('d')
|
|
#define CTIME 0
|
|
#define CMIN 1
|
|
#define CSWTC 0
|
|
#define CSTART CTRL('q')
|
|
#define CSTOP CTRL('s')
|
|
#define CSUSP CTRL('z')
|
|
#define CEOL 0
|
|
#define CREPRINT CTRL('r')
|
|
#define CDISCARD CTRL('o')
|
|
#define CWERASE CTRL('w')
|
|
#define CLNEXT CTRL('v')
|
|
#define CEOL2 CEOL
|
|
|
|
#define CEOT CEOF
|
|
#define CBRK CEOL
|
|
#define CRPRNT CREPRINT
|
|
#define CFLUSH CDISCARD
|