mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-15 23:38:05 -04:00
78 lines
2.1 KiB
Plaintext
78 lines
2.1 KiB
Plaintext
$NetBSD: patch-ad,v 1.3 2007/03/06 23:25:48 rillig Exp $
|
|
--- source/io.c.orig 1994-07-22 03:47:26.000000000 +0200
|
|
+++ source/io.c 2007-03-07 00:06:06.234247718 +0100
|
|
@@ -90,12 +90,19 @@ typedef struct { int stuff; } fpvmach;
|
|
#include <sys/types.h>
|
|
#endif
|
|
|
|
+#if (defined(BSD) && BSD >= 199306) /* XXX for all post 1993 BSDs? */
|
|
+#include <sgtty.h>
|
|
+#endif
|
|
+
|
|
#ifdef USG
|
|
#ifndef ATARI_ST
|
|
#include <string.h>
|
|
#else
|
|
#include "string.h"
|
|
#endif
|
|
+#if defined(__linux)
|
|
+# include <termios.h>
|
|
+#endif
|
|
#if 0
|
|
/* Used to include termio.h here, but that caused problems on some systems,
|
|
as curses.h includes it also above. */
|
|
@@ -245,7 +252,7 @@ int suspend()
|
|
struct ltchars lcbuf;
|
|
struct tchars cbuf;
|
|
int lbuf;
|
|
- long time();
|
|
+ time_t time();
|
|
|
|
py.misc.male |= 2;
|
|
(void) ioctl(0, TIOCGETP, (char *)&tbuf);
|
|
@@ -331,7 +338,7 @@ void init_curses()
|
|
#if defined(atarist) && defined(__GNUC__)
|
|
(void) signal (SIGTSTP, (__Sigfunc)suspend);
|
|
#else
|
|
-#ifdef __386BSD__
|
|
+#if defined(__386BSD__) || (defined(BSD) && BSD >= 199306)
|
|
(void) signal (SIGTSTP, (sig_t)suspend);
|
|
#else
|
|
(void) signal (SIGTSTP, suspend);
|
|
@@ -419,7 +426,7 @@ void moriaterm()
|
|
init_color (3,1000, 500, 0); /* pen 3 - orange */
|
|
#else
|
|
#if !defined(ATARI_ST) && !defined(VMS)
|
|
-#ifdef USG
|
|
+#if defined(USG) && defined(VINTR)
|
|
(void) ioctl(0, TCGETA, (char *)&tbuf);
|
|
/* disable all of the normal special control characters */
|
|
tbuf.c_cc[VINTR] = (char)3; /* control-C */
|
|
@@ -527,6 +534,7 @@ void restore_term()
|
|
}
|
|
#else
|
|
{
|
|
+ int y, x;
|
|
#ifdef AMIGA
|
|
closetimer ();
|
|
#endif
|
|
@@ -542,7 +550,8 @@ void restore_term()
|
|
pause_line(15);
|
|
#endif
|
|
/* this moves curses to bottom right corner */
|
|
- mvcur(stdscr->_cury, stdscr->_curx, LINES-1, 0);
|
|
+ getyx(stdscr, y, x);
|
|
+ mvcur(y, x, LINES-1, 0);
|
|
endwin(); /* exit curses */
|
|
(void) fflush (stdout);
|
|
#ifdef MSDOS
|
|
@@ -757,7 +766,7 @@ void shell_out()
|
|
msg_print("Fork failed. Try again.");
|
|
return;
|
|
}
|
|
-#if defined(USG) || defined(__386BSD__)
|
|
+#if defined(USG) || defined(__386BSD__) || (defined(BSD) && BSD >= 199306)
|
|
(void) wait((int *) 0);
|
|
#else
|
|
(void) wait((union wait *) 0);
|