--- mstools/posix/h/termios.h 2018/08/09 18:22:18 1.1 +++ mstools/posix/h/termios.h 2018/08/09 18:24:35 1.1.1.2 @@ -11,12 +11,6 @@ Abstract: This module contains the primitive system data types described in section 7.1.2.1 of IEEE P1003.1-1990 -Author: - - Ellen Aycock-Wright 06-Aug-1991 - -Revision History: - --*/ #ifndef _TERMIOS_ @@ -24,17 +18,23 @@ Revision History: #include +#ifdef __cplusplus +extern "C" { +#endif + typedef unsigned long cc_t; typedef unsigned long speed_t; typedef unsigned long tcflag_t; -#define NCCS 9 +#define NCCS 11 struct termios { tcflag_t c_iflag; /* input modes */ tcflag_t c_oflag; /* output modes */ tcflag_t c_cflag; /* control modes */ tcflag_t c_lflag; /* local modes */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ cc_t c_cc[NCCS]; /* control characters */ }; @@ -59,6 +59,10 @@ struct termios { */ #define OPOST 0x00000001 /* perform output processing */ +#define ONLCR 0x00000002 /* map NL to ASCII CR-NL on output */ +#define ONLRET 0x00000004 /* NL performs ASCII CR function */ +#define OCRNL 0x00000008 /* map ASCII CR to NL on output */ +#define ONOCR 0x00000010 /* No ASCII CR output at column 0. */ /* * Control modes, for c_cflag member @@ -99,12 +103,12 @@ struct termios { #define VERASE 2 /* ERASE character */ #define VINTR 3 /* INTR character */ #define VKILL 4 /* KILL character */ -#define VMIN VEOF /* MIN value */ -#define VQUIT 5 /* QUIT character */ -#define VSUSP 6 /* SUSP character */ -#define VTIME VEOL /* TIME value */ -#define VSTART 7 /* START character */ -#define VSTOP 8 /* STOP character */ +#define VMIN 5 /* MIN value */ +#define VQUIT 6 /* QUIT character */ +#define VSUSP 7 /* SUSP character */ +#define VTIME 8 /* TIME value */ +#define VSTART 9 /* START character */ +#define VSTOP 10 /* STOP character */ /* * Values for speed_t's @@ -167,4 +171,8 @@ int _CRTAPI1 cfsetospeed(struct term speed_t _CRTAPI1 cfgetispeed(const struct termios *); int _CRTAPI1 cfsetispeed(struct termios *, speed_t); +#ifdef __cplusplus +} +#endif + #endif /* _TERMIOS_ */