diff options
-rw-r--r-- | vietnamese/vnless/files/patch-03 | 14 | ||||
-rw-r--r-- | vietnamese/vnless/files/patch-screen.c | 50 |
2 files changed, 46 insertions, 18 deletions
diff --git a/vietnamese/vnless/files/patch-03 b/vietnamese/vnless/files/patch-03 index c0c185da2646..22495ae23e90 100644 --- a/vietnamese/vnless/files/patch-03 +++ b/vietnamese/vnless/files/patch-03 @@ -1,23 +1,29 @@ --- defines.h.orig Mon Feb 24 12:45:37 1992 -+++ defines.h Wed Dec 4 02:33:51 1996 -@@ -40,14 +40,14 @@ ++++ defines.h Sat Feb 2 10:57:31 1996 +@@ -40,14 +40,21 @@ * If TERMIO is 0 your system must have /usr/include/sgtty.h. * This is normally the case for BSD. */ -/*#define TERMIO 1*/ ++#include <sys/param.h> ++#ifdef BSD4_4 +#define TERMIO 1 ++#endif /* * 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. */ --#define SIGSETMASK 0 ++#ifdef BSD4_4 +#define SIGSETMASK 1 ++#else + #define SIGSETMASK 0 ++#endif /* * REGCMP is 1 if your system has the regcmp() function. -@@ -73,7 +73,7 @@ +@@ -73,7 +80,7 @@ * EDIT_PGM is the name of the (default) editor to be invoked. */ #define EDITOR 1 diff --git a/vietnamese/vnless/files/patch-screen.c b/vietnamese/vnless/files/patch-screen.c index af08d69013c9..a6d4ecec7187 100644 --- a/vietnamese/vnless/files/patch-screen.c +++ b/vietnamese/vnless/files/patch-screen.c @@ -1,59 +1,81 @@ --- screen.c.orig Mon Feb 24 12:45:41 1992 -+++ screen.c Sat May 20 01:40:56 2000 -@@ -12,7 +12,7 @@ ++++ screen.c Sat Feb 2 11:10:28 2008 +@@ -12,7 +12,11 @@ #endif #if TERMIO --#include <termio.h> -+#include <termios.h> ++# ifdef BSD4_4 ++#include <sys/termios.h> ++# else + #include <termio.h> ++# endif #else #include <sgtty.h> #endif -@@ -92,21 +92,21 @@ +@@ -92,21 +96,35 @@ raw_mode(on) int on; { #if TERMIO -- struct termio s; -- static struct termio save_term; ++#ifdef BSD4_4 + struct termios s; + static struct termios save_term; ++#else + struct termio s; + static struct termio save_term; ++#endif if (on) { /* * Get terminal modes. */ -- ioctl(2, TCGETA, &s); ++#ifdef BSD4_4 + tcgetattr(2, &s); ++#else + ioctl(2, TCGETA, &s); ++#endif /* * Save modes and set certain variables dependent on modes. */ save_term = s; - ospeed = s.c_cflag & CBAUD; -+ ospeed = cfgetospeed(&s); ++ ospeed = ++#ifdef BSD4_4 ++ cfgetospeed(&s); ++#else ++ s.c_cflag & CBAUD; ++#endif erase_char = s.c_cc[VERASE]; kill_char = s.c_cc[VKILL]; -@@ -114,7 +114,7 @@ +@@ -114,7 +132,12 @@ raw_mode(on) * 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 |= ++#ifdef BSD4_4 ++ (OPOST|ONLCR|OXTABS); ++#else ++ (OPOST|ONLCR|TABS3); ++#endif s.c_oflag &= ~(OCRNL|ONOCR|ONLRET); s.c_cc[VMIN] = 1; s.c_cc[VTIME] = 0; -@@ -125,7 +125,7 @@ +@@ -125,7 +148,11 @@ raw_mode(on) */ s = save_term; } -- ioctl(2, TCSETAW, &s); ++# ifdef BSD4_4 + tcsetattr(2, TCSANOW, &s); ++# else + ioctl(2, TCSETAW, &s); ++# endif #else struct sgttyb s; static struct sgttyb save_term; -@@ -480,7 +480,7 @@ +@@ -480,7 +507,7 @@ vbell() * Clear the screen. */ public void |