$NetBSD$

--- prog/check_funs.cpp.orig	2005-06-19 14:25:01.000000000 +0200
+++ prog/check_funs.cpp	2006-09-18 21:46:40.000000000 +0200
@@ -28,6 +28,12 @@
 
 #include <signal.h>
 
+#ifdef HAVE_OLD_SIGNAL
+#define SIGNALARG2 (void (*)(...))
+#else
+#define SIGNALARG2 /* empty, no change */
+#endif
+
 #include "asc_ctype.hpp"
 #include "check_funs.hpp"
 #include "convert.hpp"
@@ -174,8 +180,8 @@
   
 static void continue_handler(int) {
   restore_state();
-  signal(SIGTSTP, suspend_handler);
-  signal(SIGCONT,  continue_handler),
+  signal(SIGTSTP, SIGNALARG2 suspend_handler);
+  signal(SIGCONT, SIGNALARG2 continue_handler),
     last_signal = 0;
 }
 
@@ -191,7 +197,7 @@
 
 static void suspend() {
   save_state();
-  signal(SIGTSTP, SIG_DFL);
+  signal(SIGTSTP, SIGNALARG2 SIG_DFL);
   raise(SIGTSTP);
   last_signal = 0;
 }
@@ -200,7 +206,7 @@
   switch (last_signal) {
   case SIGWINCH:
     resize();
-    signal(SIGWINCH, resize_handler);
+    signal(SIGWINCH, SIGNALARG2 resize_handler);
     break;
   case SIGTSTP:
     suspend();
@@ -216,7 +222,8 @@
   choice_w = 0;
   nonl();
   noecho();
-  halfdelay(1);
+  cbreak();
+  timeout(100);
   keypad(stdscr, true);
   clear();
   int height, width;
@@ -272,9 +279,9 @@
     }
   }
   if (use_curses) {
-    signal(SIGWINCH, resize_handler);
-    signal(SIGTSTP,  suspend_handler);
-    signal(SIGCONT,  continue_handler);
+    signal(SIGWINCH, SIGNALARG2 resize_handler);
+    signal(SIGTSTP, SIGNALARG2 suspend_handler);
+    signal(SIGCONT, SIGNALARG2 continue_handler);
   }
 #endif
   if (use_curses) {
