BarryServer : Git

All the code for all my projects
// BarryServer : Git / OrionLibC / blob / d0db5bd73909d1f94cac363ea1dfd12674bbd3a4 / include / termios.h

// Related

OrionLibC

Barry Importing existing Orion LibC 03048a9 (2 years, 2 months ago)
#ifndef _TERMIOS_H
#define _TERMIOS_H

/* ioctl() calls */
enum TTYIoctls {
	TCGETS,
	TCSETS,
	TCGWINSZ,
};

enum TTYLineDiscipline {
	ISIG = (1 << 0),
	ICANON = (1 << 1),
	ECHO = (1 << 2),
};

typedef unsigned int tcflag_t;

/* Terminal I/O Settings */
typedef struct Termios {
	tcflag_t iflag;
	tcflag_t oflag;
	tcflag_t cflag;
	tcflag_t lflag;
} Termios;

/* Terminal Window Size */
typedef struct Winsize {
	unsigned short rows, cols;
	unsigned short xres, yres;
} Winsize;

#endif