mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
Kernel: Move TYPEDEF_* TTY macros to API/ttydefaults.h file
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.
This commit is contained in:
parent
800e244ed9
commit
6b849fc8b1
4 changed files with 92 additions and 76 deletions
47
Kernel/API/ttydefaultschars.h
Normal file
47
Kernel/API/ttydefaultschars.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Daniel Bertalan <dani@danielbertalan.dev>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/API/POSIX/termios.h>
|
||||
#include <Kernel/API/ttydefaults.h>
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wc99-designator"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static const cc_t ttydefchars[NCCS] = {
|
||||
[VINTR] = CINTR,
|
||||
[VQUIT] = CQUIT,
|
||||
[VERASE] = CERASE,
|
||||
[VKILL] = CKILL,
|
||||
[VEOF] = CEOF,
|
||||
[VTIME] = CTIME,
|
||||
[VMIN] = CMIN,
|
||||
[VSWTC] = CSWTC,
|
||||
[VSTART] = CSTART,
|
||||
[VSTOP] = CSTOP,
|
||||
[VSUSP] = CSUSP,
|
||||
[VEOL] = CEOL,
|
||||
[VREPRINT] = CREPRINT,
|
||||
[VDISCARD] = CDISCARD,
|
||||
[VWERASE] = CWERASE,
|
||||
[VLNEXT] = CLNEXT,
|
||||
[VEOL2] = CEOL2
|
||||
};
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue