aboutsummaryrefslogtreecommitdiffstats
path: root/vietnamese/vnless/files
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2008-01-22 00:26:25 +0800
committerobrien <obrien@FreeBSD.org>2008-01-22 00:26:25 +0800
commit073db3f105b05bba01cfbe38aff428b1d8dbb854 (patch)
treebab1a7110ebbe4619555a256f683eccacff9fa79 /vietnamese/vnless/files
parente572de8c4c17664040b91cb779cb67de10d837f7 (diff)
downloadfreebsd-ports-gnome-073db3f105b05bba01cfbe38aff428b1d8dbb854.tar.gz
freebsd-ports-gnome-073db3f105b05bba01cfbe38aff428b1d8dbb854.tar.zst
freebsd-ports-gnome-073db3f105b05bba01cfbe38aff428b1d8dbb854.zip
Use termios instead of sgtty.
PR: 119107 Submitted by: Ed Schouten <ed@fxq.nl>
Diffstat (limited to 'vietnamese/vnless/files')
-rw-r--r--vietnamese/vnless/files/patch-0310
-rw-r--r--vietnamese/vnless/files/patch-screen.c57
2 files changed, 65 insertions, 2 deletions
diff --git a/vietnamese/vnless/files/patch-03 b/vietnamese/vnless/files/patch-03
index 97d89a25eaa7..c0c185da2646 100644
--- a/vietnamese/vnless/files/patch-03
+++ b/vietnamese/vnless/files/patch-03
@@ -1,6 +1,14 @@
--- defines.h.orig Mon Feb 24 12:45:37 1992
+++ defines.h Wed Dec 4 02:33:51 1996
-@@ -47,7 +47,7 @@
+@@ -40,14 +40,14 @@
+ * If TERMIO is 0 your system must have /usr/include/sgtty.h.
+ * This is normally the case for BSD.
+ */
+-/*#define TERMIO 1*/
++#define TERMIO 1
+
+ /*
+ * SIGSETMASK is 1 if your system has the sigsetmask() call.
* This is normally the case only for BSD 4.2,
* not for BSD 4.1 or System 5.
*/
diff --git a/vietnamese/vnless/files/patch-screen.c b/vietnamese/vnless/files/patch-screen.c
index 86bf7977fb92..af08d69013c9 100644
--- a/vietnamese/vnless/files/patch-screen.c
+++ b/vietnamese/vnless/files/patch-screen.c
@@ -1,9 +1,64 @@
--- screen.c.orig Mon Feb 24 12:45:41 1992
+++ screen.c Sat May 20 01:40:56 2000
-@@ -481,5 +481,5 @@
+@@ -12,7 +12,7 @@
+ #endif
+
+ #if TERMIO
+-#include <termio.h>
++#include <termios.h>
+ #else
+ #include <sgtty.h>
+ #endif
+@@ -92,21 +92,21 @@
+ int on;
+ {
+ #if TERMIO
+- struct termio s;
+- static struct termio save_term;
++ struct termios s;
++ static struct termios save_term;
+
+ if (on)
+ {
+ /*
+ * Get terminal modes.
+ */
+- ioctl(2, TCGETA, &s);
++ tcgetattr(2, &s);
+
+ /*
+ * Save modes and set certain variables dependent on modes.
+ */
+ save_term = s;
+- ospeed = s.c_cflag & CBAUD;
++ ospeed = cfgetospeed(&s);
+ erase_char = s.c_cc[VERASE];
+ kill_char = s.c_cc[VKILL];
+
+@@ -114,7 +114,7 @@
+ * Set the modes to the way we want them.
+ */
+ s.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL);
+- s.c_oflag |= (OPOST|ONLCR|TAB3);
++ s.c_oflag |= (OPOST|ONLCR|OXTABS);
+ s.c_oflag &= ~(OCRNL|ONOCR|ONLRET);
+ s.c_cc[VMIN] = 1;
+ s.c_cc[VTIME] = 0;
+@@ -125,7 +125,7 @@
+ */
+ s = save_term;
+ }
+- ioctl(2, TCSETAW, &s);
++ tcsetattr(2, TCSANOW, &s);
+ #else
+ struct sgttyb s;
+ static struct sgttyb save_term;
+@@ -480,7 +480,7 @@
+ * Clear the screen.
*/
public void
-clear()
+clearscr()
{
tputs(sc_clear, sc_height, putchr);
+ }