#include <h/mts.h>
#include <h/utils.h>
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#else
-# ifdef HAVE_TERMIO_H
-# include <termio.h>
-# else
-# include <sgtty.h>
-# endif
-#endif
+#include <termios.h>
#include <pwd.h>
#include <setjmp.h>
static void fin_io (struct Cmd *, int);
static void finaux_io (struct Cmd *);
static void m_init (void);
-static RETSIGTYPE intrser (int);
-static RETSIGTYPE pipeser (int);
-static RETSIGTYPE quitser (int);
-static RETSIGTYPE alrmser (int);
+static void intrser (int);
+static void pipeser (int);
+static void quitser (int);
+static void alrmser (int);
static int pINI (void);
static int pQRY (char *, int);
static int pQRY1 (int);
-static RETSIGTYPE
+static void
intrser (int i)
{
-#ifndef RELIABLE_SIGNALS
- SIGNAL (SIGINT, intrser);
-#endif
-
discard (stdout);
interrupted++;
}
-static RETSIGTYPE
+static void
pipeser (int i)
{
-#ifndef RELIABLE_SIGNALS
- SIGNAL (SIGPIPE, pipeser);
-#endif
-
if (broken_pipe++ == 0)
fprintf (stderr, "broken pipe\n");
told_to_quit++;
}
-static RETSIGTYPE
+static void
quitser (int i)
{
-#ifndef RELIABLE_SIGNALS
- SIGNAL (SIGQUIT, quitser);
-#endif
-
told_to_quit++;
interrupted++;
}
-static RETSIGTYPE
+static void
alrmser (int i)
{
longjmp (peerenv, DONE);