Merge branch 'master' of git://github.com/thepowersgang/acess2
[tpg/acess2.git] / Usermode / Libraries / libposix.so_src / include_exp / termios.h
index a200f2c..3862338 100644 (file)
@@ -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
 

UCC git Repository :: git.ucc.asn.au