aboutsummaryrefslogtreecommitdiff
path: root/test/hashtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/hashtest.c')
-rw-r--r--test/hashtest.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/test/hashtest.c b/test/hashtest.c
index 849922173c8f..e11348d8aadc 100644
--- a/test/hashtest.c
+++ b/test/hashtest.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2010,2013 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2017,2019 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,7 +30,7 @@
*
* Generate timing statistics for vertical-motion optimization.
*
- * $Id: hashtest.c,v 1.32 2013/04/27 19:50:17 tom Exp $
+ * $Id: hashtest.c,v 1.35 2019/12/07 18:07:04 tom Exp $
*/
#include <test.priv.h>
@@ -82,7 +82,7 @@ genlines(int base)
move(0, 0);
for (i = 0; i < head_lines; i++)
for (j = 0; j < COLS; j++)
- addch(UChar((j % 8 == 0) ? ('A' + j / 8) : '-'));
+ AddCh(UChar((j % 8 == 0) ? ('A' + j / 8) : '-'));
move(head_lines, 0);
for (i = head_lines; i < LINES - foot_lines; i++) {
@@ -90,13 +90,13 @@ genlines(int base)
+ LO_CHAR);
int hi = (extend_corner || (i < LINES - 1)) ? COLS : COLS - 1;
for (j = 0; j < hi; j++)
- addch(c);
+ AddCh(c);
}
for (i = LINES - foot_lines; i < LINES; i++) {
move(i, 0);
for (j = 0; j < (extend_corner ? COLS : COLS - 1); j++)
- addch(UChar((j % 8 == 0) ? ('A' + j / 8) : '-'));
+ AddCh(UChar((j % 8 == 0) ? ('A' + j / 8) : '-'));
}
scrollok(stdscr, TRUE);
@@ -222,12 +222,10 @@ main(int argc, char *argv[])
test_optimize = TRUE;
}
#if USE_TRACE
- trace(TRACE_TIMES);
+ curses_trace(TRACE_TIMES);
#endif
- CATCHALL(finish); /* arrange interrupts to terminate */
-
- (void) initscr(); /* initialize the curses library */
+ InitAndCatch(initscr(), finish);
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 */