aboutsummaryrefslogtreecommitdiff
path: root/games/moria
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2008-06-19 06:39:27 +0000
committerGreg Lewis <glewis@FreeBSD.org>2008-06-19 06:39:27 +0000
commit6202c80e167669dc0276bf1e500bfc25c5ba8b5d (patch)
tree9c25d18c758d2271e06bb6a968af0e1e8875ba05 /games/moria
parent97a25d7ea3ad9a32b45267a41906c5af16198739 (diff)
downloadports-6202c80e167669dc0276bf1e500bfc25c5ba8b5d.tar.gz
ports-6202c80e167669dc0276bf1e500bfc25c5ba8b5d.zip
Notes
Diffstat (limited to 'games/moria')
-rw-r--r--games/moria/files/patch-source::io.c128
1 files changed, 121 insertions, 7 deletions
diff --git a/games/moria/files/patch-source::io.c b/games/moria/files/patch-source::io.c
index ee9cb30c4f30..8bec0d1170d6 100644
--- a/games/moria/files/patch-source::io.c
+++ b/games/moria/files/patch-source::io.c
@@ -1,19 +1,28 @@
$FreeBSD$
---- source/io.c.orig Thu Jul 21 19:47:26 1994
-+++ source/io.c Fri Aug 15 07:42:02 2003
+--- source/io.c.orig 1994-07-21 18:47:26.000000000 -0700
++++ source/io.c 2008-06-18 23:29:02.000000000 -0700
@@ -13,6 +13,11 @@
#include "config.h"
+#ifdef __FreeBSD__
-+#include <sys/ioctl_compat.h>
-+#include <time.h>
++#include <termios.h>
++#define USG
+#endif
+
#ifdef HPUX
#include <sys/bsdtty.h>
#endif
+@@ -201,7 +206,7 @@
+ #if !defined(MAC) && !defined(MSDOS) && !defined(ATARI_ST) && !defined(VMS)
+ #ifndef AMIGA
+ #ifdef USG
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
+ static struct termios save_termio;
+ #else
+ static struct termio save_termio;
@@ -245,7 +250,9 @@
struct ltchars lcbuf;
struct tchars cbuf;
@@ -24,7 +33,17 @@ $FreeBSD$
py.misc.male |= 2;
(void) ioctl(0, TIOCGETP, (char *)&tbuf);
-@@ -313,7 +320,7 @@
+@@ -306,14 +313,16 @@
+ #endif
+ #else
+ #if !defined(VMS) && !defined(MSDOS) && !defined(ATARI_ST)
+-#ifndef AMIGA
++#if !defined(AMIGA) && !defined(__FreeBSD__)
+ (void) ioctl(0, TCGETA, (char *)&save_termio);
++#else
++ (void) tcgetattr(0, &save_termio);
+ #endif
+ #endif
#endif
/* PC curses returns ERR */
@@ -33,7 +52,7 @@ $FreeBSD$
if (initscr() == NULL)
#else
if (initscr() == ERR)
-@@ -331,7 +338,7 @@
+@@ -331,7 +340,7 @@
#if defined(atarist) && defined(__GNUC__)
(void) signal (SIGTSTP, (__Sigfunc)suspend);
#else
@@ -42,7 +61,89 @@ $FreeBSD$
(void) signal (SIGTSTP, (sig_t)suspend);
#else
(void) signal (SIGTSTP, suspend);
-@@ -757,7 +764,7 @@
+@@ -385,7 +394,7 @@
+ #if !defined(MSDOS) && !defined(ATARI_ST) && !defined(VMS)
+ #ifndef AMIGA
+ #ifdef USG
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
+ struct termios tbuf;
+ #else
+ struct termio tbuf;
+@@ -420,7 +429,11 @@
+ #else
+ #if !defined(ATARI_ST) && !defined(VMS)
+ #ifdef USG
++#ifdef __FreeBSD__
++ (void) tcgetattr(0, &tbuf);
++#else
+ (void) ioctl(0, TCGETA, (char *)&tbuf);
++#endif
+ /* disable all of the normal special control characters */
+ tbuf.c_cc[VINTR] = (char)3; /* control-C */
+ tbuf.c_cc[VQUIT] = (char)-1;
+@@ -438,7 +451,11 @@
+ tbuf.c_cc[VMIN] = 1; /* Input should wait for at least 1 char */
+ tbuf.c_cc[VTIME] = 0; /* no matter how long that takes. */
+
++#ifdef __FreeBSD__
++ (void) tcsetattr(0, TCSANOW, &tbuf);
++#else
+ (void) ioctl(0, TCSETA, (char *)&tbuf);
++#endif
+ #else
+ /* disable all of the special characters except the suspend char, interrupt
+ char, and the control flow start/stop characters */
+@@ -552,9 +569,13 @@
+ #ifdef USG
+ #if !defined(MSDOS) && !defined(ATARI_ST) && !defined(VMS)
+ #ifndef AMIGA
++#ifdef __FreeBSD__
++ (void) tcsetattr(0, TCSANOW, &save_termio);
++#else
+ (void) ioctl(0, TCSETA, (char *)&save_termio);
+ #endif
+ #endif
++#endif
+ #else
+ (void) ioctl(0, TIOCSLTC, (char *)&save_special_chars);
+ (void) ioctl(0, TIOCSETP, (char *)&save_ttyb);
+@@ -646,7 +667,7 @@
+ {
+ #ifdef USG
+ #if !defined(MSDOS) && !defined(ATARI_ST) && !defined(AMIGA)
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
+ struct termios tbuf;
+ #else
+ struct termio tbuf;
+@@ -683,8 +704,12 @@
+
+ #ifdef USG
+ #if !defined(MSDOS) && !defined(ATARI_ST) && !defined(AMIGA)
++#ifdef __FreeBSD__
++ (void) tcgetattr(0, &tbuf);
++#else
+ (void) ioctl(0, TCGETA, (char *)&tbuf);
+ #endif
++#endif
+ #else
+ (void) ioctl(0, TIOCGETP, (char *)&tbuf);
+ (void) ioctl(0, TIOCGETC, (char *)&cbuf);
+@@ -725,8 +750,12 @@
+ default_signals();
+ #ifdef USG
+ #if !defined(MSDOS) && !defined(ATARI_ST) && !defined(AMIGA)
++#ifdef __FreeBSD__
++ (void) tcsetattr(0, TCSANOW, &save_termio);
++#else
+ (void) ioctl(0, TCSETA, (char *)&save_termio);
+ #endif
++#endif
+ #else
+ (void) ioctl(0, TIOCSLTC, (char *)&save_special_chars);
+ (void) ioctl(0, TIOCSETP, (char *)&save_ttyb);
+@@ -757,7 +786,7 @@
msg_print("Fork failed. Try again.");
return;
}
@@ -51,3 +152,16 @@ $FreeBSD$
(void) wait((int *) 0);
#else
(void) wait((union wait *) 0);
+@@ -785,8 +814,12 @@
+ /* have to disable ^Y for tunneling */
+ #ifdef USG
+ #if !defined(MSDOS) && !defined(ATARI_ST)
++#ifdef __FreeBSD__
++ (void) tcsetattr(0, TCSANOW, &tbuf);
++#else
+ (void) ioctl(0, TCSETA, (char *)&tbuf);
+ #endif
++#endif
+ #else
+ (void) ioctl(0, TIOCSLTC, (char *)&lcbuf);
+ (void) ioctl(0, TIOCSETP, (char *)&tbuf);