summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/termios.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-09-07 16:23:51 +0000
committerChristopher Faylor <me@cgf.cx>2000-09-07 16:23:51 +0000
commit29ac7f89e36e5f5b46286cdbb5501bcea3ce2055 (patch)
tree53317078f39b909b63757eadca3cf80fdd654738 /winsup/cygwin/termios.cc
parentc1644acb233ed749b28b4139604ab134cf1cd34c (diff)
downloadcygnal-29ac7f89e36e5f5b46286cdbb5501bcea3ce2055.tar.gz
cygnal-29ac7f89e36e5f5b46286cdbb5501bcea3ce2055.tar.bz2
cygnal-29ac7f89e36e5f5b46286cdbb5501bcea3ce2055.zip
Split out tty and shared_info stuff into their own headers and use throughout.
Include sys/termios.h for files which need it. * tty.h: New file. * shared_info.h: New file. * fhandler.h: Move inline methods that rely on tty stuff to fhandler_console.cc. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set output_done_event immediately after reading data to speed up tty output processing. (process_output): Set write_error to errno or zero. (fhandler_tty_slave::write): Check previous write error prior to writing to slave end of pipe. This allows tty output to be slightly less synchronous. * fhandler_console.cc (fhandler_console::tcsetpgrp): Moved here from fhandler.h. (fhandler_console::set_input_state): Ditto.
Diffstat (limited to 'winsup/cygwin/termios.cc')
-rw-r--r--winsup/cygwin/termios.cc37
1 files changed, 13 insertions, 24 deletions
diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc
index 52fe489ee..07fa998da 100644
--- a/winsup/cygwin/termios.cc
+++ b/winsup/cygwin/termios.cc
@@ -16,10 +16,10 @@ details. */
#include "cygerrno.h"
#include "fhandler.h"
#include "dtable.h"
+#include <sys/termios.h>
/* tcsendbreak: POSIX 7.2.2.1 */
-extern "C"
-int
+extern "C" int
tcsendbreak (int fd, int duration)
{
int res = -1;
@@ -47,8 +47,7 @@ out:
}
/* tcdrain: POSIX 7.2.2.1 */
-extern "C"
-int
+extern "C" int
tcdrain (int fd)
{
int res = -1;
@@ -78,8 +77,7 @@ out:
}
/* tcflush: POSIX 7.2.2.1 */
-extern "C"
-int
+extern "C" int
tcflush (int fd, int queue)
{
int res = -1;
@@ -107,8 +105,7 @@ out:
}
/* tcflow: POSIX 7.2.2.1 */
-extern "C"
-int
+extern "C" int
tcflow (int fd, int action)
{
int res = -1;
@@ -136,8 +133,7 @@ out:
}
/* tcsetattr: POSIX96 7.2.1.1 */
-extern "C"
-int
+extern "C" int
tcsetattr (int fd, int a, const struct termios *t)
{
int res = -1;
@@ -169,8 +165,7 @@ out:
}
/* tcgetattr: POSIX 7.2.1.1 */
-extern "C"
-int
+extern "C" int
tcgetattr (int fd, struct termios *in_t)
{
int res = -1;
@@ -197,8 +192,7 @@ tcgetattr (int fd, struct termios *in_t)
}
/* tcgetpgrp: POSIX 7.2.3.1 */
-extern "C"
-int
+extern "C" int
tcgetpgrp (int fd)
{
int res = -1;
@@ -215,8 +209,7 @@ tcgetpgrp (int fd)
}
/* tcsetpgrp: POSIX 7.2.4.1 */
-extern "C"
-int
+extern "C" int
tcsetpgrp (int fd, pid_t pgid)
{
int res = -1;
@@ -239,24 +232,21 @@ tcsetpgrp (int fd, pid_t pgid)
#undef cfsetispeed
/* cfgetospeed: POSIX96 7.1.3.1 */
-extern "C"
-speed_t
+extern "C" speed_t
cfgetospeed (struct termios *tp)
{
return __tonew_termios(tp)->c_ospeed;
}
/* cfgetispeed: POSIX96 7.1.3.1 */
-extern "C"
-speed_t
+extern "C" speed_t
cfgetispeed (struct termios *tp)
{
return __tonew_termios(tp)->c_ispeed;
}
/* cfsetospeed: POSIX96 7.1.3.1 */
-extern "C"
-int
+extern "C" int
cfsetospeed (struct termios *in_tp, speed_t speed)
{
struct termios *tp = __tonew_termios (in_tp);
@@ -266,8 +256,7 @@ cfsetospeed (struct termios *in_tp, speed_t speed)
}
/* cfsetispeed: POSIX96 7.1.3.1 */
-extern "C"
-int
+extern "C" int
cfsetispeed (struct termios *in_tp, speed_t speed)
{
struct termios *tp = __tonew_termios (in_tp);