The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
termios.h File Reference

terminal settings. More...

#include <sys/types.h>

Go to the source code of this file.

Data Structures

struct  termios

Macros

#define NCCS   19
#define INLCR   0x0040
#define IGNCR   0x0080
#define ICRNL   0x0100
#define IXON   0x0400
#define BRKINT   0x0002
#define INPCK   0x0010
#define ISTRIP   0x0020
#define OPOST   0x0001
#define ONLCR   0x0004
#define CS8   0x0030
#define CREAD   0x0080
#define ISIG   0x0001
#define ICANON   0x0002
#define ECHO   0x0008
#define ECHOE   0x0010
#define ECHOK   0x0020
#define TOSTOP   0x0100
#define IEXTEN   0x8000
#define XKEYEVENTS   0x40000000
#define XKEYRAW   0x20000000
#define VINTR   0
#define VQUIT   1
#define VERASE   2
#define VKILL   3
#define VEOF   4
#define VTIME   5
#define VMIN   6
#define VSUSP   10
#define TCSANOW   0
#define TCSADRAIN   1
#define TCSAFLUSH   2

Typedefs

typedef unsigned int tcflag_t
typedef unsigned char cc_t
typedef unsigned int speed_t

Functions

int tcgetattr (int fd, struct termios *t)
int tcsetattr (int fd, int when, const struct termios *t)
void cfmakeraw (struct termios *t)
 settings for byte-by-byte input with no echo, no signals and no output processing.
pid_t tcgetpgrp (int fd)
 the foreground process group of the terminal on fd, and setting it.
int tcsetpgrp (int fd, pid_t pgrp)

Detailed Description

terminal settings.

the layout, flags and values are ABI and must match the kernel side in src/kernel/console/termios.h exactly (they are the Linux i386 ones).

Macro Definition Documentation

◆ NCCS

#define NCCS   19

◆ INLCR

#define INLCR   0x0040

◆ IGNCR

#define IGNCR   0x0080

◆ ICRNL

#define ICRNL   0x0100

◆ IXON

#define IXON   0x0400

◆ BRKINT

#define BRKINT   0x0002

◆ INPCK

#define INPCK   0x0010

◆ ISTRIP

#define ISTRIP   0x0020

◆ OPOST

#define OPOST   0x0001

◆ ONLCR

#define ONLCR   0x0004

◆ CS8

#define CS8   0x0030

◆ CREAD

#define CREAD   0x0080

◆ ISIG

#define ISIG   0x0001

◆ ICANON

#define ICANON   0x0002

◆ ECHO

#define ECHO   0x0008

◆ ECHOE

#define ECHOE   0x0010

◆ ECHOK

#define ECHOK   0x0020

◆ TOSTOP

#define TOSTOP   0x0100

◆ IEXTEN

#define IEXTEN   0x8000

◆ XKEYEVENTS

#define XKEYEVENTS   0x40000000

◆ XKEYRAW

#define XKEYRAW   0x20000000

◆ VINTR

#define VINTR   0

◆ VQUIT

#define VQUIT   1

◆ VERASE

#define VERASE   2

◆ VKILL

#define VKILL   3

◆ VEOF

#define VEOF   4

◆ VTIME

#define VTIME   5

◆ VMIN

#define VMIN   6

◆ VSUSP

#define VSUSP   10

◆ TCSANOW

#define TCSANOW   0

◆ TCSADRAIN

#define TCSADRAIN   1

◆ TCSAFLUSH

#define TCSAFLUSH   2

Typedef Documentation

◆ tcflag_t

typedef unsigned int tcflag_t

◆ cc_t

typedef unsigned char cc_t

◆ speed_t

typedef unsigned int speed_t

Function Documentation

◆ tcgetattr()

int tcgetattr ( int fd,
struct termios * t )

◆ tcsetattr()

int tcsetattr ( int fd,
int when,
const struct termios * t )

◆ cfmakeraw()

void cfmakeraw ( struct termios * t)

settings for byte-by-byte input with no echo, no signals and no output processing.

◆ tcgetpgrp()

pid_t tcgetpgrp ( int fd)

the foreground process group of the terminal on fd, and setting it.

◆ tcsetpgrp()

int tcsetpgrp ( int fd,
pid_t pgrp )