BarryServer : Git

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

// Related

OrionLibC

Barry Using POSIX names for structs 11f4683 (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 c_iflag;
	tcflag_t c_oflag;
	tcflag_t c_cflag;
	tcflag_t c_lflag;
} Termios;

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

#endif