ports/119113: [Patch] japanese/rogue_s: Don't use sgtty.
Ed Schouten
ed at fxq.nl
Mon Dec 31 14:10:02 UTC 2007
The following reply was made to PR ports/119113; it has been noted by GNATS.
From: Ed Schouten <ed at fxq.nl>
To: Yoshihiko Sarumaru <mistral at imasy.or.jp>
Cc: bug-followup at FreeBSD.org
Subject: Re: ports/119113: [Patch] japanese/rogue_s: Don't use sgtty.
Date: Mon, 31 Dec 2007 15:09:04 +0100
--qL6YN2OI1pnKQLYZ
Content-Type: multipart/mixed; boundary="udOl8koJG4PSVcOF"
Content-Disposition: inline
--udOl8koJG4PSVcOF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hello,
Could you please try the attached diff? It no longer shows the artifacts
on my machine. It removes the hardcoded VTIME/VMIN indices and partially
reverts some of the work, which makes the terminal flushing work again.
Yours,
--=20
Ed Schouten <ed at fxq.nl>
WWW: http://g-rave.nl/
--udOl8koJG4PSVcOF
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="rogue_s.diff"
Content-Transfer-Encoding: quoted-printable
--- japanese/rogue_s/files/patch-aa 2000-07-18 19:38:04.000000000 +0200
+++ japanese/rogue_s/files/patch-aa 2007-12-31 13:42:18.000000000 +0100
@@ -16,7 +16,7 @@
-#CFLAGS =3D -O -g -DUNIX -DUNIX_BSD4_2 -DUNIX_386BSD -DCURSES -DJAPAN -DE=
UC -DTOPSCO
-#LIBS =3D
+CC =3D cc
-+CFLAGS +=3D -DUNIX -DUNIX_BSD4_2 -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DT=
OPSCO -DCOLOR -DMESG_DIR=3D\"${PREFIX}/share/rogue\" -DLIST_MESSAGES
++CFLAGS +=3D -DUNIX -DUNIX_SYSV -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DTOP=
SCO -DCOLOR -DMESG_DIR=3D\"${PREFIX}/share/rogue\" -DLIST_MESSAGES
+LIBS =3D
=20
# for NeXT (Japanese, using jcurses of NeXT) by Yasha
--- japanese/rogue_s/files/patch-ac 2000-07-18 19:38:04.000000000 +0200
+++ japanese/rogue_s/files/patch-ac 2007-12-31 15:03:24.000000000 +0100
@@ -1,6 +1,70 @@
--- machdep.c.orig Mon Sep 14 14:40:12 1992
+++ machdep.c Fri Dec 4 00:22:26 1998
-@@ -397,9 +397,9 @@
+@@ -54,9 +54,10 @@
+ # include <sys/types.h>
+ # include <sys/file.h>
+ # include <sys/stat.h>
++# include <sys/ioctl.h>
+ # ifdef UNIX_SYSV
+ # include <time.h>
+-# include <termio.h>
++# include <termios.h>
+ # endif /* UNIX_SYSV */
+ # ifdef UNIX_BSD4_2
+ # include <sys/time.h>
+@@ -268,13 +269,7 @@
+ #ifdef UNIX
+ long ln =3D 0;
+=20
+-#ifdef UNIX_BSD4_2
+ ioctl(0, FIONREAD, &ln);
+-#endif /* UNIX_BSD4_2 */
+-#ifdef UNIX_SYSV
+- ioctl(0, TCFLSH, &ln);
+- ln =3D 0;
+-#endif /* UNIX_SYSV */
+ #ifdef UNIX_386BSD
+ fpurge(stdin);
+ #else
+@@ -334,8 +329,8 @@
+ struct tchars tc_temp;
+ #endif /* UNIX_BSD4_2 */
+ #ifdef UNIX_SYSV
+- static struct termio _oldtty;
+- struct termio _tty;
++ static struct termios _oldtty;
++ struct termios _tty;
+ #endif /* UNIX_SYSV */
+=20
+ if (!called_before) {
+@@ -345,7 +340,7 @@
+ ioctl(0, TIOCGLTC, <c_orig);
+ #endif /* UNIX_BSD4_2 */
+ #ifdef UNIX_SYSV
+- ioctl(0, TCGETA, &_oldtty);
++ tcgetattr(0, &_oldtty);
+ #endif /* UNIX_SYSV */
+ }
+ #ifdef UNIX_BSD4_2
+@@ -364,7 +359,7 @@
+ tc_temp.t_startc =3D tc_temp.t_stopc =3D -1;
+ #endif /* UNIX_BSD4_2 */
+ #ifdef UNIX_SYSV
+- _tty.c_cc[VSWTCH] =3D CNSWTCH;
++ _tty.c_cc[VSUSP] =3D 0;
+ #endif /* UNIX_SYSV */
+ }
+ #ifdef UNIX_BSD4_2
+@@ -372,7 +367,7 @@
+ ioctl(0, TIOCSLTC, <c_temp);
+ #endif /* UNIX_BSD4_2 */
+ #ifdef UNIX_SYSV
+- ioctl(0, TCSETA, &_tty);
++ tcsetattr(0, TCSANOW, &_tty);
+ #endif /* UNIX_SYSV */
+ #endif /* UNIX */
+ }
+@@ -397,9 +392,9 @@
md_heed_signals()
{
#ifdef UNIX
@@ -13,3 +77,30 @@
#endif /* UNIX */
=20
#ifdef HUMAN
+@@ -907,19 +902,19 @@
+ }
+ #endif /* UNIX_BSD4_2 */
+ #ifdef UNIX_SYSV
+- struct termio tty_buf;
+- static struct termio tty_save;
++ struct termios tty_buf;
++ static struct termios tty_save;
+=20
+ if (on) {
+- ioctl(0, TCGETA, &tty_buf);
++ tcgetattr(0, &tty_buf);
+ tty_save =3D tty_buf;
+ tty_buf.c_lflag &=3D ~(ICANON | ECHO);
+ tty_buf.c_oflag &=3D ~ONLCR;
+- tty_buf.c_cc[4] =3D 1; /* MIN */
+- tty_buf.c_cc[5] =3D 2; /* TIME */
+- ioctl(0, TCSETAF, &tty_buf);
++ tty_buf.c_cc[VMIN] =3D 1;
++ tty_buf.c_cc[VTIME] =3D 2;
++ tcsetattr(0, TCSAFLUSH, &tty_buf);
+ } else {
+- ioctl(0, TCSETAF, &tty_save);
++ tcsetattr(0, TCSAFLUSH, &tty_save);
+ }
+ #endif /* UNIX_SYSV */
+ #endif /* UNIX */
--udOl8koJG4PSVcOF--
--qL6YN2OI1pnKQLYZ
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
iD8DBQFHePgA52SDGA2eCwURAv3zAJ9fobKCd3Jli/33mU+W/wGI5rKmjwCeOLDG
X1qd8ESmTPPC8+Dvx7/g/DQ=
=PJ88
-----END PGP SIGNATURE-----
--qL6YN2OI1pnKQLYZ--
More information about the freebsd-ports-bugs
mailing list