6ec4d9369d
PR: ports/110384 Submitted by: Ed Schouten <ed@fxq.nl>
37 lines
759 B
Text
37 lines
759 B
Text
--- settatr.c.orig Mon Mar 26 14:59:01 2007
|
|
+++ settatr.c Mon Mar 26 15:00:41 2007
|
|
@@ -4,7 +4,7 @@
|
|
|
|
set_terminal_attributes()
|
|
{
|
|
-#ifdef BSD
|
|
+#if 0
|
|
struct sgttyb sg;
|
|
struct tchars tc;
|
|
struct ltchars lt;
|
|
@@ -33,20 +33,19 @@
|
|
lt.t_rprntc = '';
|
|
ioctl ( 0, TIOCSLTC, < );
|
|
#endif
|
|
-#ifdef SYSV
|
|
- struct termio t;
|
|
+#if 1
|
|
+ struct termios t;
|
|
|
|
- ioctl ( 0, TCGETA, &t );
|
|
+ tcgetattr(0, &t);
|
|
|
|
t.c_cc[VINTR] = '\003';
|
|
t.c_cc[VERASE] = '\b';
|
|
t.c_cc[VKILL] = '\025';
|
|
t.c_iflag = IGNBRK | IGNPAR | ICRNL | IXON ;
|
|
- t.c_oflag = OPOST | ONLCR ;
|
|
+ t.c_oflag = OPOST | ONLCR | OXTABS;
|
|
t.c_lflag = ISIG | ICANON | ECHO | ECHOE | ECHOK ;
|
|
- t.c_cflag |= TAB3;
|
|
|
|
- ioctl ( 0, TCSETA, &t );
|
|
+ tcsetattr(0, TCSANOW, &t);
|
|
#endif
|
|
}
|
|
set_resource_limits()
|