* wrs(5/28/93) -- modified to be consistent (perform identically) with either
* PDCurses or under Unix System V, R4
*
- * $Id: testcurs.c,v 1.53 2017/12/23 21:38:26 tom Exp $
+ * $Id: testcurs.c,v 1.56 2021/03/27 22:39:50 tom Exp $
*/
#include <test.priv.h>
PDC_debug("initTest called\n");
#endif
#ifdef TRACE
- trace(TRACE_MAXIMUM);
+ curses_trace(TRACE_MAXIMUM);
#endif
initscr();
#ifdef PDCDEBUG
height = 13; /* Create a drawing window */
*win = newwin(height, width, (LINES - height) / 2, (COLS - width) / 2);
if (*win == NULL) {
- exit_curses();
+ stop_curses();
return 0;
}
return 1;
{
int answered;
int repeat;
- int w, h, bx, by, sw, sh, i, c, num;
+ int w, h, bx, by, sw, sh, i, num;
char buffer[80];
WINDOW *subWin;
wclear(win);
#endif
for (;;) {
+ int c;
+
wmove(win, 3, 5);
c = wgetch(win);
wclrtobot(win);
static void
outputTest(WINDOW *win)
{
- WINDOW *win1;
char Buffer[80];
chtype ch;
int by, bx;
MvWAddStr(win, 6, 1, "display of at least 24 LINES by 75 COLUMNS");
Continue(win);
} else {
- win1 = newwin(10, 50, 14, 25);
+ WINDOW *win1 = newwin(10, 50, 14, 25);
if (win1 == NULL) {
endwin();
return;
win1 = newwin(10, 50, 14, 25);
if (win1 == NULL) {
- exit_curses();
+ stop_curses();
return;
}
#ifdef A_COLOR
static void
padTest(WINDOW *dummy GCC_UNUSED)
{
- WINDOW *pad, *spad;
+ WINDOW *pad;
if ((pad = newpad(50, 100)) != 0) {
+ WINDOW *spad;
+
wattron(pad, A_REVERSE);
MvWAddStr(pad, 5, 2, "This is a new pad");
(void) wattrset(pad, A_NORMAL);
char *argv[]GCC_UNUSED)
{
WINDOW *win;
- int key;
int old_option = (-1);
int new_option = 0;
bool quit = FALSE;
erase();
display_menu(old_option, new_option);
+
for (;;) {
+ int key;
+
#ifdef A_COLOR
if (has_colors()) {
init_pair(1, COLOR_WHITE, COLOR_BLUE);
delwin(win);
- exit_curses();
+ stop_curses();
#ifdef XCURSES
XCursesExit();
#endif