X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Flibposix.so_src%2Finclude_exp%2Ftermios.h;h=38623385853032682ca61fcdaa2ccf094568ff70;hb=1f733f85261667f86a083a85bc07e736b44dfbe2;hp=a200f2c4a5f75ba7d78cab574d25b076f7c0d8fa;hpb=b806b8f55067584cb90fe20277235369a1111c66;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libposix.so_src/include_exp/termios.h b/Usermode/Libraries/libposix.so_src/include_exp/termios.h index a200f2c4..38623385 100644 --- a/Usermode/Libraries/libposix.so_src/include_exp/termios.h +++ b/Usermode/Libraries/libposix.so_src/include_exp/termios.h @@ -63,6 +63,22 @@ typedef unsigned short tcflag_t; // c_cflag #define CBAUD (037 << 0) // Baud speed +#define B0 (0 << 0) +#define B50 (1 << 0) +#define B75 (2 << 0) +#define B110 (3 << 0) +#define B134 (4 << 0) +#define B150 (5 << 0) +#define B200 (6 << 0) +#define B300 (7 << 0) +#define B600 (8 << 0) +#define B1200 (9 << 0) +#define B1800 (10 << 0) +#define B2400 (11 << 0) +#define B4800 (12 << 0) +#define B9600 (13 << 0) +#define B19200 (14 << 0) +#define B38400 (15 << 0) #define CSIZE (3 << 5) // Character size mask #define CS5 (0 << 5) #define CS6 (1 << 5) @@ -121,6 +137,7 @@ enum VWERASE, NCCS }; +#define _POSIX_VDISABLE 255 struct termios { @@ -131,5 +148,29 @@ struct termios cc_t c_cc[NCCS]; }; +extern speed_t cfgetospeed(const struct termios *termios_p); + +extern int tcgetattr(int fd, struct termios *termios_p); + +#define TCSANOW 0x01 +#define TCSADRAIN 0x02 +#define TCSAFLUSH 0x04 +extern int tcsetattr(int fd, int optional_actions, const struct termios *termios_p); + +// ioctl() calls for terminals +enum +{ + TIOCGWINSZ, + TIOCSWINSZ +}; + +struct winsize { + unsigned short ws_row; + unsigned short ws_col; + unsigned short ws_xpixel; /* unused */ + unsigned short ws_ypixel; /* unused */ +}; + + #endif