miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
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
26typedef unsigned int tcflag_t;
27typedef 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
48
49int tcgetattr(int fd, struct termios *t);
50int tcsetattr(int fd, int actions, const struct termios *t);
51void cfmakeraw(struct termios *t);
52int isatty(int fd);
53
54#endif
Definition termios.h:41
tcflag_t c_cflag
Definition termios.h:44
cc_t c_cc[NCCS]
Definition termios.h:46
tcflag_t c_iflag
Definition termios.h:42
tcflag_t c_lflag
Definition termios.h:45
tcflag_t c_oflag
Definition termios.h:43
int fd
Definition syscall_fs.c:0
unsigned char cc_t
Definition termios.h:27
#define NCCS
Definition termios.h:31
int tcsetattr(int fd, int actions, const struct termios *t)
Definition tty.c:31
int isatty(int fd)
Definition tty.c:52
void cfmakeraw(struct termios *t)
Definition tty.c:46
int tcgetattr(int fd, struct termios *t)
Definition tty.c:27
unsigned int tcflag_t
Definition termios.h:26