This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] additional sys/termios.h defines


The attached patch adds a few defines to <sys/termios.h> to make it
compatible with Linux and *BSD.


Yaakov

2012-11-04  Yaakov Selkowitz  <yselkowitz@...>

	* include/sys/termios.h (CBRK): Define as alias of CEOL.
	(CREPRINT): Define as alias of CRPRNT.
	(CDISCARD): Define as alias of CFLUSH.
	(TTYDEF_*): Define.

Index: include/sys/termios.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/sys/termios.h,v
retrieving revision 1.22
diff -u -p -r1.22 termios.h
--- include/sys/termios.h	28 Feb 2012 14:03:03 -0000	1.22
+++ include/sys/termios.h	5 Nov 2012 02:35:34 -0000
@@ -85,6 +85,7 @@ POSIX commands */
 #define CEOT	CTRL('D')
 #define CEOL	0
 #define CEOL2	0
+#define CBRK	CEOL
 #define CEOF	CTRL('D')
 #define CSTART	CTRL('Q')
 #define CSTOP	CTRL('S')
@@ -93,7 +94,9 @@ POSIX commands */
 #define CSUSP	CTRL('Z')
 #define CDSUSP	CTRL('Y')
 #define CRPRNT	CTRL('R')
+#define CREPRINT	CRPRNT
 #define CFLUSH	CTRL('O')
+#define CDISCARD	CFLUSH
 #define CWERASE	CTRL('W')
 #define CLNEXT	CTRL('V')
 
@@ -241,6 +244,12 @@ POSIX commands */
    `struct termios'.  If VAL is _POSIX_VDISABLE, no character can match it.  */
 #define CCEQ(val, c)	((c) == (val) && (val) != _POSIX_VDISABLE)
 
+#define TTYDEF_IFLAG	(BRKINT	| ICRNL	| IMAXBEL | IXON | IXANY)
+#define TTYDEF_OFLAG	(OPOST | ONLCR)
+#define TTYDEF_LFLAG	(ICANON | ISIG | IEXTEN | ECHO | ECHOE | ECHOKE | ECHOCTL)
+#define TTYDEF_CFLAG	(CREAD | CS8 | HUPCL)
+#define TTYDEF_SPEED	(B9600)
+
 typedef unsigned char cc_t;
 typedef unsigned int  tcflag_t;
 typedef unsigned int  speed_t;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]