* scroll operation worked, and the refresh() code only had to do a
* partial repaint.
*
- * $Id: view.c,v 1.101 2017/04/15 20:14:01 tom Exp $
+ * $Id: view.c,v 1.104 2017/09/30 17:50:38 tom Exp $
*/
#include <test.priv.h>
int value = 0;
bool done = FALSE;
bool got_number = FALSE;
+ bool ignore_sigs = FALSE;
bool single_step = FALSE;
#if CAN_RESIZE
bool nonposix_resize = FALSE;
try_color = TRUE;
break;
case 'i':
- CATCHALL(SIG_IGN);
+ ignore_sigs = TRUE;
break;
case 'n':
if ((MAXLINES = atoi(optarg)) < 1 ||
(void) fclose(fp);
num_lines = (int) (lptr - vec_lines);
- (void) initscr(); /* initialize the curses library */
+ if (ignore_sigs) {
+ InitAndCatch(initscr(), SIG_IGN);
+ } else {
+ initscr();
+ }
keypad(stdscr, TRUE); /* enable keyboard mapping */
(void) nonl(); /* tell curses not to do NL->CR/NL on output */
(void) cbreak(); /* take input chars one at a time, no wait for \n */
break;
#endif
case 's':
+#if HAVE_HALFDELAY
if (got_number) {
halfdelay(my_delay = n);
} else {
nodelay(stdscr, FALSE);
my_delay = -1;
}
+#else
+ nodelay(stdscr, FALSE);
+ my_delay = -1;
+#endif
break;
case ' ':
nodelay(stdscr, TRUE);
}
#if defined(NCURSES_VERSION) || defined(HAVE_WCHGAT)
if (try_color)
- wchgat(stdscr, -1, A_NORMAL, my_pair, NULL);
+ wchgat(stdscr, -1, WA_NORMAL, my_pair, NULL);
#endif
}
}