miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
Toggle main menu visibility
Loading...
Searching...
No Matches
termios.h
Go to the documentation of this file.
1
// MIT License
2
//
3
// Copyright (c) 2026 Christian Spoo
4
//
5
// Permission is hereby granted, free of charge, to any person obtaining a copy
6
// of this software and associated documentation files (the "Software"), to deal
7
// in the Software without restriction, including without limitation the rights
8
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
// copies of the Software, and to permit persons to whom the Software is
10
// furnished to do so, subject to the following conditions:
11
//
12
// The above copyright notice and this permission notice shall be included in all
13
// copies or substantial portions of the Software.
14
//
15
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
// SOFTWARE.
22
23
#ifndef _TERMIOS_H_
24
#define _TERMIOS_H_
25
26
typedef
unsigned
int
tcflag_t
;
27
typedef
unsigned
char
cc_t
;
28
29
#define VINTR 0
30
#define VEOF 1
31
#define NCCS 8
32
33
#define ISIG 0x0001u
34
#define ICANON 0x0002u
35
#define ECHO 0x0008u
36
37
#define TCSANOW 0
38
#define TCSADRAIN 1
39
#define TCSAFLUSH 2
40
41
struct
termios
{
42
tcflag_t
c_iflag
;
43
tcflag_t
c_oflag
;
44
tcflag_t
c_cflag
;
45
tcflag_t
c_lflag
;
46
cc_t
c_cc
[
NCCS
];
47
};
48
49
int
tcgetattr
(
int
fd
,
struct
termios
*t);
50
int
tcsetattr
(
int
fd
,
int
actions,
const
struct
termios
*t);
51
void
cfmakeraw
(
struct
termios
*t);
52
int
isatty
(
int
fd
);
53
54
#endif
termios
Definition
termios.h:41
termios::c_cflag
tcflag_t c_cflag
Definition
termios.h:44
termios::c_cc
cc_t c_cc[NCCS]
Definition
termios.h:46
termios::c_iflag
tcflag_t c_iflag
Definition
termios.h:42
termios::c_lflag
tcflag_t c_lflag
Definition
termios.h:45
termios::c_oflag
tcflag_t c_oflag
Definition
termios.h:43
fd
int fd
Definition
syscall_fs.c:0
cc_t
unsigned char cc_t
Definition
termios.h:27
NCCS
#define NCCS
Definition
termios.h:31
tcsetattr
int tcsetattr(int fd, int actions, const struct termios *t)
Definition
tty.c:31
isatty
int isatty(int fd)
Definition
tty.c:52
cfmakeraw
void cfmakeraw(struct termios *t)
Definition
tty.c:46
tcgetattr
int tcgetattr(int fd, struct termios *t)
Definition
tty.c:27
tcflag_t
unsigned int tcflag_t
Definition
termios.h:26
include
termios.h
Generated by
1.18.0