ularn/ularn-termio.patch
2026-07-17 13:29:59 +02:00

170 lines
4.3 KiB
Diff

diff -rU4 Ularn--orig/config.h.SH Ularn/config.h.SH
--- Ularn--orig/config.h.SH 2001-11-16 19:13:15.000000000 +0100
+++ Ularn/config.h.SH 2026-03-07 17:21:51.720626157 +0100
@@ -76,14 +76,14 @@
*/
#$d_index index strchr /* cultural */
#$d_index rindex strrchr /* differences? */
-/* TERMIO:
+/* TERMIOS:
* This symbol, if defined, indicates that the program should include
- * termio.h rather than sgtty.h. There are also differences in the
+ * termios.h rather than sgtty.h. There are also differences in the
* ioctl() calls that depend on the value of this symbol.
*/
-#$d_termio TERMIO /**/
+#$d_termios TERMIOS /**/
/* VOIDSIG:
* This symbol is defined if this system declares "void (*signal())()" in
* signal.h. The old way was to declare it as "int (*signal())()". It
diff -rU4 Ularn--orig/Configure Ularn/Configure
--- Ularn--orig/Configure 2001-11-16 19:15:20.000000000 +0100
+++ Ularn/Configure 2026-03-07 17:21:14.148181056 +0100
@@ -49,9 +49,9 @@
cppminus=''
d_ftime=''
d_getopt=''
d_index=''
-d_termio=''
+d_termios=''
d_voidsig=''
libc=''
mansrc=''
manext=''
@@ -1174,22 +1174,22 @@
Cppsym -l $attrlist >Cppsym.true
cat Cppsym.true
rmlist="$rmlist Cppsym Cppsym.know Cppsym.true"
-: see if this is a termio system
+: see if this is a termios system
echo " "
if Cppsym pyr && $test -r /usr/include/sgtty.h ; then
- d_termio="$undef"
+ d_termios="$undef"
echo "sgtty.h found."
-elif $test -r /usr/include/termio.h ; then
- d_termio="$define"
- echo "termio.h found."
+elif $test -r /usr/include/termios.h ; then
+ d_termios="$define"
+ echo "termios.h found."
elif $test -r /usr/include/sgtty.h ; then
- d_termio="$undef"
+ d_termios="$undef"
echo "sgtty.h found."
else
- d_termio="$undef"
- echo "Neither termio.h nor sgtty.h found--you could have problems."
+ d_termios="$undef"
+ echo "Neither termios.h nor sgtty.h found--you could have problems."
fi
: see if signal is declared as pointer to function returning int or void
echo " "
@@ -1411,9 +1411,9 @@
cppminus='$cppminus'
d_ftime='$d_ftime'
d_getopt='$d_getopt'
d_index='$d_index'
-d_termio='$d_termio'
+d_termios='$d_termios'
d_voidsig='$d_voidsig'
libc='$libc'
mansrc='$mansrc'
manext='$manext'
diff -rU4 Ularn--orig/header.h Ularn/header.h
--- Ularn--orig/header.h 2001-11-16 19:13:19.000000000 +0100
+++ Ularn/header.h 2026-03-07 17:21:57.378543714 +0100
@@ -13,15 +13,15 @@
#ifdef ITIMER
# include SYSTIME
#endif /* ITIMER */
-#ifdef TERMIO
-# include <termio.h>
+#ifdef TERMIOS
+# include <termios.h>
#else
# include <sys/ioctl.h>
# include <sys/file.h>
# include <sgtty.h>
-#endif /* TERMIO */
+#endif /* TERMIOS */
#include <ctype.h>
#include <fcntl.h>
#include <pwd.h>
diff -rU4 Ularn--orig/tty.c Ularn/tty.c
--- Ularn--orig/tty.c 2001-11-16 19:13:32.000000000 +0100
+++ Ularn/tty.c 2026-07-17 13:24:52.570317999 +0200
@@ -2,9 +2,9 @@
#include "header.h"
#include "player.h"
#include "extern.h"
-#ifndef TERMIO /* sgtty stuff */
+#ifndef TERMIOS /* sgtty stuff */
# define ECHOMASK ECHO
# define termstruct sgttyb
# define kill_sym sg_kill
# define erase_sym sg_erase
@@ -24,10 +24,11 @@
# define vmin t_eofc
# define vtime t_brkc
struct tchars inittyb2, curttyb2;
#else
+# include <sys/ioctl.h>
# define ECHOMASK (ECHO|ECHOE|ECHOK|ECHONL)
-# define termstruct termio
+# define termstruct termios
# define kill_sym c_cc[VKILL]
# define erase_sym c_cc[VERASE]
# define intr_sym c_cc[VINTR]
# define EXTABS TAB3
@@ -45,9 +46,9 @@
# define vmin c_cc[VMIN]
# define vtime c_cc[VTIME]
# define inittyb2 inittyb
# define curttyb2 curttyb
-#endif /* TERMIO */
+#endif /* TERMIOS */
extern short ospeed;
static struct termstruct inittyb, curttyb;
@@ -100,9 +101,9 @@
setuptty()
{
curttyb.echoflgs &= ~ECHOMASK;
-#ifdef TERMIO
+#ifdef TERMIOS
curttyb.cbrkflgs &= ~CBRKMASK;
#else
curttyb.cbrkflgs |= CBRKMASK;
#endif
@@ -120,9 +121,9 @@
*/
scbr ()
{
curttyb.cbrkflgs &= ~ECHOMASK;
-#ifdef TERMIO
+#ifdef TERMIOS
curttyb.cbrkflgs &= ~CBRKMASK;
#else
curttyb.cbrkflgs |= CBRKMASK;
#endif
@@ -135,9 +136,9 @@
*/
sncbr ()
{
curttyb.cbrkflgs |= ECHOMASK;
-#ifdef TERMIO
+#ifdef TERMIOS
curttyb.cbrkflgs |= CBRKMASK;
#else
curttyb.cbrkflgs &= ~CBRKMASK;
#endif