aboutsummaryrefslogtreecommitdiffstats
path: root/net/tintin++
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2008-01-21 20:59:07 +0800
committermiwi <miwi@FreeBSD.org>2008-01-21 20:59:07 +0800
commitf7014e2bba498a65d192b972c2bedd9e71689eba (patch)
tree2fe8a3b7e805aa45aa4b02e177b726d0e1434f6a /net/tintin++
parent6ab7d1a70cd560539972754d658d68124255d245 (diff)
downloadfreebsd-ports-graphics-f7014e2bba498a65d192b972c2bedd9e71689eba.tar.gz
freebsd-ports-graphics-f7014e2bba498a65d192b972c2bedd9e71689eba.tar.zst
freebsd-ports-graphics-f7014e2bba498a65d192b972c2bedd9e71689eba.zip
- Use termios.h instead of sgtty.h
PR: 119103 Submitted by: Ed Schouten <ed@fxq.nl> Approved by: maintainer timeout
Diffstat (limited to 'net/tintin++')
-rw-r--r--net/tintin++/files/patch-ad32
-rw-r--r--net/tintin++/files/patch-term.c79
2 files changed, 94 insertions, 17 deletions
diff --git a/net/tintin++/files/patch-ad b/net/tintin++/files/patch-ad
index 2d06a9015f7..5ab9d21903d 100644
--- a/net/tintin++/files/patch-ad
+++ b/net/tintin++/files/patch-ad
@@ -1,23 +1,21 @@
--- main.c.orig Thu Mar 25 11:26:53 1999
+++ main.c Tue Sep 26 17:27:58 2000
-@@ -18,6 +18,7 @@
- #include <signal.h>
- #include "tintin.h"
- #include <fcntl.h>
-+#include <termios.h>
+@@ -100,12 +100,8 @@
+ extern void term_echo();
- #ifndef BADSIG
- #define BADSIG (void (*)())-1
-@@ -109,7 +110,7 @@
+ int last_line_length;
+-#if defined(HAVE_SYS_TERMIO_H) && !defined(BSD_ECHO) || defined(HAVE_TERMIO_H)
+-#if defined(HAVE_SYS_TERMIO_H)
+-#include <sys/termio.h>
+-#else
+-#include <termio.h>
+-#endif
++#if 1
++#include <termios.h>
tcflag_t c_lflag;
cc_t c_cc[NCCS];
#else
--unsigned char c_cc[NCC];
-+unsigned char c_cc[NCCS];
- unsigned short c_lflag;
- #endif
-
-@@ -580,7 +581,7 @@
+@@ -580,7 +576,7 @@
if(ses->logfile) {
if (!OLD_LOG) {
count=0;
@@ -26,7 +24,7 @@
if (buffer[n]!='\r') {
temp[count]=buffer[n];
count++;
-@@ -750,7 +751,7 @@
+@@ -750,7 +746,7 @@
sprintf(strng,"%c8%s\n\r%c7%c[%d;%df", E, cptr, E, E, input_row, input_col);
else
sprintf(strng,"%s\n\r", cptr);
@@ -35,7 +33,7 @@
display_col=1;
if (redraw && term_echoing && !is_split)
write(1, k_input, strlen(k_input));
-@@ -806,7 +807,7 @@
+@@ -806,7 +802,7 @@
cptr++;
sprintf(strng,"%s\n\r", cptr);
}
@@ -44,7 +42,7 @@
display_col=1;
}
text_came=TRUE;
-@@ -876,7 +877,7 @@
+@@ -876,7 +872,7 @@
input_col=1;
sprintf(fn, "%c[2J%c[1;%dr%c[%d;1f", E, E, display_row, E, split_line);
write(1,fn, strlen(fn));
diff --git a/net/tintin++/files/patch-term.c b/net/tintin++/files/patch-term.c
new file mode 100644
index 00000000000..7a6246a3f65
--- /dev/null
+++ b/net/tintin++/files/patch-term.c
@@ -0,0 +1,79 @@
+--- echo.c 1999-03-04 19:23:42.000000000 +0100
++++ echo.c 2007-12-28 15:23:31.000000000 +0100
+@@ -18,12 +18,8 @@
+ #include <sys/ioctl.h>
+ #endif
+
+-#if defined(HAVE_SYS_TERMIO_H) && !defined(BSD_ECHO) || defined(HAVE_TERMIO_H)
+-#if defined(HAVE_SYS_TERMIO_H)
+-#include <sys/termio.h>
+-#else
+-#include <termio.h>
+-#endif
++#if 1
++#include <termios.h>
+ #else
+ #include <sgtty.h>
+ #if DIRTY_REDEFINE
+@@ -34,8 +30,8 @@
+ #endif
+ #endif
+
+-#if defined(HAVE_SYS_TERMIO_H) && !defined(BSD_ECHO) || defined(HAVE_TERMIO_H)
+-#ifdef HAVE_TCFLAG_T
++#if 1
++#if 1
+ extern tcflag_t c_lflag;
+ extern cc_t c_cc[NCCS];
+ #else
+@@ -44,10 +40,10 @@
+ #endif
+ void init_echo()
+ {
+- struct termio io;
++ struct termios io;
+
+- if(ioctl(0, TCGETA, &io)<0)
+- syserr("ioctl");
++ if(tcgetattr(0, &io)<0)
++ syserr("tcgetattr");
+ c_lflag = io.c_lflag;
+ c_cc[VMIN] = io.c_cc[VMIN];
+ c_cc[VTIME] = io.c_cc[VTIME];
+@@ -58,14 +54,14 @@
+ /********************************/
+ void term_echo()
+ {
+- struct termio io;
++ struct termios io;
+
+- if(ioctl(0, TCGETA, &io)<0)
++ if(tcgetattr(0, &io)<0)
+ syserr("ioctl");
+ io.c_lflag = c_lflag;
+ io.c_cc[VMIN] = c_cc[VMIN];
+ io.c_cc[VTIME] = c_cc[VTIME];
+- if(ioctl(0, TCSETA, &io)<0)
++ if(tcsetattr(0, TCSANOW, &io)<0)
+ syserr("ioctl");
+ }
+
+@@ -74,15 +70,15 @@
+ /*********************************/
+ void term_noecho()
+ {
+- struct termio io;
++ struct termios io;
+
+- if(ioctl(0, TCGETA, &io)<0)
++ if(tcgetattr(0, &io)<0)
+ syserr("ioctl");
+ io.c_lflag &= ~ECHO;
+ io.c_lflag &= ~ICANON;
+ io.c_cc[VMIN]=1;
+ io.c_cc[VTIME]=0;
+- if(ioctl(0, TCSETA, &io) < 0)
++ if(tcsetattr(0, TCSANOW, &io) < 0)
+ syserr("ioctl");
+ }
+