Группа :: Работа с текстами
Пакет: ispell
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: ispell-3.1.20-termio.patch
--- ispell-3.1/term.c.termio Tue Jun 30 11:38:08 1998
+++ ispell-3.1/term.c Tue Jun 30 11:49:41 1998
@@ -65,7 +65,8 @@
#include "proto.h"
#include "msgs.h"
#ifdef USG
-#include <termio.h>
+#include <unistd.h>
+#include <termios.h>
#else
#include <sgtty.h>
#endif
@@ -136,8 +137,8 @@
}
#ifdef USG
-static struct termio sbuf;
-static struct termio osbuf;
+static struct termios sbuf;
+static struct termios osbuf;
#else
static struct sgttyb sbuf;
static struct sgttyb osbuf;
@@ -247,7 +248,7 @@
(void) fprintf (stderr, TERM_C_NO_BATCH);
exit (1);
}
- (void) ioctl (0, TCGETA, (char *) &osbuf);
+ tcgetattr(STDIN_FILENO, &osbuf);
termchanged = 1;
sbuf = osbuf;
@@ -256,7 +257,7 @@
sbuf.c_iflag &= ~(INLCR | IGNCR | ICRNL);
sbuf.c_cc[VMIN] = 1;
sbuf.c_cc[VTIME] = 1;
- (void) ioctl (0, TCSETAW, (char *) &sbuf);
+ tcsetattr(STDIN_FILENO, TCSANOW, &sbuf);
uerasechar = osbuf.c_cc[VERASE];
ukillchar = osbuf.c_cc[VKILL];
@@ -344,7 +345,7 @@
if (te)
tputs (te, 1, putch);
#ifdef USG
- (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ tcsetattr(STDIN_FILENO, TCSANOW, &osbuf);
#else
(void) ioctl (0, TIOCSETP, (char *) &osbuf);
#ifdef TIOCSLTC
@@ -360,7 +361,7 @@
int signo;
{
#ifdef USG
- (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ tcsetattr(STDIN_FILENO, TCSANOW, &osbuf);
#else
(void) ioctl (0, TIOCSETP, (char *) &osbuf);
#ifdef TIOCSLTC
@@ -375,7 +376,7 @@
/* stop here until continued */
(void) signal (signo, onstop);
#ifdef USG
- (void) ioctl (0, TCSETAW, (char *) &sbuf);
+ tcsetattr(STDIN_FILENO, TCSANOW, &sbuf);
#else
(void) ioctl (0, TIOCSETP, (char *) &sbuf);
#ifdef TIOCSLTC
@@ -435,7 +436,7 @@
argv[i] = NULL;
#ifdef USG
- (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ tcsetattr(STDIN_FILENO, TCSANOW, &osbuf);
#else
(void) ioctl (0, TIOCSETP, (char *) &osbuf);
#ifdef TIOCSLTC
@@ -481,7 +482,7 @@
#endif
#ifdef USG
- (void) ioctl (0, TCSETAW, (char *) &sbuf);
+ tcsetattr(STDIN_FILENO, TCSANOW, &sbuf);
#else
(void) ioctl (0, TIOCSETP, (char *) &sbuf);
#ifdef TIOCSLTC
@@ -514,7 +515,7 @@
#endif
#ifdef USG
- (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ tcsetattr(STDIN_FILENO, TCSANOW, &osbuf);
#else
(void) ioctl (0, TIOCSETP, (char *) &osbuf);
#ifdef TIOCSLTC
@@ -546,7 +547,7 @@
#endif
#ifdef USG
- (void) ioctl (0, TCSETAW, (char *) &sbuf);
+ tcsetattr(STDIN_FILENO, TCSANOW, &sbuf);
#else
(void) ioctl (0, TIOCSETP, (char *) &sbuf);
#ifdef TIOCSLTC