summaryrefslogtreecommitdiff
path: root/textproc/ispell-base
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2001-03-16 11:05:46 +0000
committerwiz <wiz@pkgsrc.org>2001-03-16 11:05:46 +0000
commitd4fec39926f19171c477ea5c9202a4d0b928d7ca (patch)
tree2b2149d29e54eedb3d103c7d79fb0c2c05aab812 /textproc/ispell-base
parent4cb22763576b1ab4ef5ef9c8867b7adf6135872a (diff)
downloadpkgsrc-d4fec39926f19171c477ea5c9202a4d0b928d7ca.tar.gz
Use termios instead of TIOC{G,S}ETP, so that ispell works on machines
without COMPAT_43 in the kernel.
Diffstat (limited to 'textproc/ispell-base')
-rw-r--r--textproc/ispell-base/files/patch-sum3
-rw-r--r--textproc/ispell-base/patches/patch-ak147
2 files changed, 149 insertions, 1 deletions
diff --git a/textproc/ispell-base/files/patch-sum b/textproc/ispell-base/files/patch-sum
index dc627587069..e3fd0c52ae1 100644
--- a/textproc/ispell-base/files/patch-sum
+++ b/textproc/ispell-base/files/patch-sum
@@ -1,4 +1,4 @@
-$NetBSD: patch-sum,v 1.1.1.1 2001/03/14 12:10:22 agc Exp $
+$NetBSD: patch-sum,v 1.2 2001/03/16 11:05:46 wiz Exp $
SHA1 (patch-aa) = cf8e0863e62103526d75ba5f0f25c760d4ee8e32
SHA1 (patch-ab) = 6cad60fd5b86f6691702eb69d59cd650a9eb27a2
@@ -10,3 +10,4 @@ SHA1 (patch-ag) = 49790fdbd7602c199fafe8a4c5f372286c4b2a88
SHA1 (patch-ah) = 2a5da425a5a6c97907218b96515f2a9718d1e9ca
SHA1 (patch-ai) = 210d80ca55fc1d4fb5aa308205d8630a7f4bfb67
SHA1 (patch-aj) = 645d9c15fe6148e4ced398729aab6ffc9662c1d8
+SHA1 (patch-ak) = a60cbdead54b450457a1313107513c61747c4c1f
diff --git a/textproc/ispell-base/patches/patch-ak b/textproc/ispell-base/patches/patch-ak
new file mode 100644
index 00000000000..b4bbb60f678
--- /dev/null
+++ b/textproc/ispell-base/patches/patch-ak
@@ -0,0 +1,147 @@
+$NetBSD: patch-ak,v 1.1 2001/03/16 11:05:46 wiz Exp $
+
+--- term.c.orig Wed Nov 2 19:44:28 1994
++++ term.c
+@@ -64,7 +64,10 @@
+ #include "ispell.h"
+ #include "proto.h"
+ #include "msgs.h"
+-#ifdef USG
++#ifdef __NetBSD__
++#define USE_TERMIOS
++#include <termios.h>
++#elif defined(USG)
+ #include <termio.h>
+ #else
+ #include <sgtty.h>
+@@ -135,7 +138,10 @@
+ return putchar (c);
+ }
+
+-#ifdef USG
++#ifdef USE_TERMIOS
++static struct termios sbuf;
++static struct termios osbuf;
++#elif defined(USG)
+ static struct termio sbuf;
+ static struct termio osbuf;
+ #else
+@@ -263,8 +269,31 @@
+
+ #endif
+
++#ifdef USE_TERMIOS
++ if (!isatty (0))
++ {
++ (void) fprintf (stderr, TERM_C_NO_BATCH);
++ exit (1);
++ }
++ tcgetattr(0, &osbuf);
++ termchanged = 1;
++
++ sbuf = osbuf;
++ sbuf.c_lflag &= ~(ECHO | ECHOK | ECHONL | ICANON);
++ sbuf.c_oflag &= ~(OPOST);
++ sbuf.c_iflag &= ~(INLCR | IGNCR | ICRNL);
++ sbuf.c_lflag |= ISIG;
++ sbuf.c_cc[VMIN] = 1;
++ sbuf.c_cc[VTIME] = 0;
++ tcsetattr(0, TCSANOW, &sbuf);
++
++ uerasechar = osbuf.c_cc[VERASE];
++ ukillchar = osbuf.c_cc[VKILL];
++
++#endif
++
+ #ifdef SIGTSTP
+-#ifndef USG
++#if !(defined(USG) || defined(USE_TERMIOS))
+ (void) sigsetmask (1<<(SIGTSTP-1) | 1<<(SIGTTIN-1) | 1<<(SIGTTOU-1));
+ #endif
+ #endif
+@@ -290,7 +319,7 @@
+ #endif
+ #endif
+
+-#ifndef USG
++#if !(defined(USG) || defined(USE_TERMIOS))
+ (void) ioctl (0, TIOCGETP, (char *) &osbuf);
+ #ifdef TIOCGLTC
+ (void) ioctl (0, TIOCGLTC, (char *) &oltc);
+@@ -343,7 +372,9 @@
+ {
+ if (te)
+ tputs (te, 1, putch);
+-#ifdef USG
++#ifdef USE_TERMIOS
++ tcsetattr(0, TCSANOW, &osbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &osbuf);
+@@ -359,7 +390,9 @@
+ static SIGNAL_TYPE onstop (signo)
+ int signo;
+ {
+-#ifdef USG
++#ifdef USE_TERMIOS
++ tcsetattr(0, TCSANOW, &osbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &osbuf);
+@@ -374,7 +407,9 @@
+ (void) kill (0, signo);
+ /* stop here until continued */
+ (void) signal (signo, onstop);
+-#ifdef USG
++#ifdef USE_TERMIOS
++ tcsetattr(0, TCSANOW, &sbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &sbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &sbuf);
+@@ -434,7 +469,9 @@
+ }
+ argv[i] = NULL;
+
+-#ifdef USG
++#ifdef USE_TERMIOS
++ tcsetattr(0, TCSANOW, &osbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &osbuf);
+@@ -480,7 +517,9 @@
+ (void) signal (SIGTSTP, onstop);
+ #endif
+
+-#ifdef USG
++#ifdef USE_TERMIOS
++ tcsetattr(0, TCSANOW, &sbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &sbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &sbuf);
+@@ -513,7 +552,9 @@
+ int ch;
+ #endif
+
+-#ifdef USG
++#ifdef USE_TERMIOS
++ tcsetattr(0, TCSANOW, &osbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &osbuf);
+@@ -545,7 +586,9 @@
+ (void) signal (SIGTSTP, onstop);
+ #endif
+
+-#ifdef USG
++#ifdef USE_TERMIOS
++ tcsetattr(0, TCSANOW, &sbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &sbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &sbuf);