X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftestcurs.c;h=7a44a2c642cdb80e4229322411449b63f863a6ff;hp=5fa054a943a51b2cb7c6724074b142910593ce2e;hb=07e31b3b587a07281ff7c71e5c13248a31048257;hpb=b1f61d9f3aa244512045a6b02e759825d7049d34 diff --git a/test/testcurs.c b/test/testcurs.c index 5fa054a9..7a44a2c6 100644 --- a/test/testcurs.c +++ b/test/testcurs.c @@ -1,5 +1,4 @@ /* - * * This is a test program for the PDCurses screen package for IBM PC type * machines. * @@ -7,11 +6,10 @@ * wrs(5/28/93) -- modified to be consistent (perform identically) with either * PDCurses or under Unix System V, R4 * - * $Id: testcurs.c,v 1.22 2000/06/17 23:23:34 tom Exp $ + * $Id: testcurs.c,v 1.50 2015/07/05 00:11:10 tom Exp $ */ #include -#include #if defined(XCURSES) char *XCursesProgramName = "testcurs"; @@ -34,9 +32,9 @@ struct commands { }; typedef struct commands COMMAND; -const COMMAND command[] = +static const COMMAND command[] = { - {"Intro Test", introTest}, + {"General Test", introTest}, {"Pad Test", padTest}, #if defined(PDCURSES) && !defined(XCURSES) {"Resize Test", resizeTest}, @@ -45,32 +43,37 @@ const COMMAND command[] = {"Input Test", inputTest}, {"Output Test", outputTest} }; -#define MAX_OPTIONS ((sizeof(command)/sizeof(command[0]))) +#define MAX_OPTIONS (int) SIZEOF(command) -int width, height; +static int width, height; int main( - int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) + int argc GCC_UNUSED, + char *argv[]GCC_UNUSED) { WINDOW *win; - int key, old_option = (-1), new_option = 0; + int key; + int old_option = (-1); + int new_option = 0; bool quit = FALSE; + int n; + + setlocale(LC_ALL, ""); #ifdef PDCDEBUG PDC_debug("testcurs started\n"); #endif if (!initTest(&win)) - return EXIT_FAILURE; + ExitProgram(EXIT_FAILURE); erase(); display_menu(old_option, new_option); - while (1) { + for (;;) { #ifdef A_COLOR if (has_colors()) { init_pair(1, COLOR_WHITE, COLOR_BLUE); - wbkgd(win, COLOR_PAIR(1)); + wbkgd(win, (chtype) COLOR_PAIR(1)); } else wbkgd(win, A_REVERSE); #else @@ -82,6 +85,17 @@ main( keypad(stdscr, TRUE); raw(); key = getch(); + if (key < KEY_MIN && key > 0 && isalpha(key)) { + if (islower(key)) + key = toupper(key); + for (n = 0; n < MAX_OPTIONS; ++n) { + if (key == command[n].text[0]) { + display_menu(old_option, new_option = n); + key = ' '; + break; + } + } + } switch (key) { case 10: case 13: @@ -93,12 +107,15 @@ main( display_menu(old_option, new_option); break; case KEY_UP: - new_option = (new_option == 0) ? new_option : new_option - 1; + new_option = ((new_option == 0) + ? new_option + : new_option - 1); display_menu(old_option, new_option); break; case KEY_DOWN: - new_option = (new_option == MAX_OPTIONS - 1) ? new_option : - new_option + 1; + new_option = ((new_option == (MAX_OPTIONS - 1)) + ? new_option + : new_option + 1); display_menu(old_option, new_option); break; case 'Q': @@ -106,6 +123,9 @@ main( quit = TRUE; break; default: + beep(); + break; + case ' ': break; } if (quit == TRUE) @@ -118,7 +138,7 @@ main( #ifdef XCURSES XCursesExit(); #endif - return EXIT_SUCCESS; + ExitProgram(EXIT_SUCCESS); } static void @@ -128,15 +148,15 @@ Continue(WINDOW *win) int x1 = getmaxx(win); int y0 = y1 < 10 ? y1 : 10; int x0 = 1; - long save; + chtype save; save = mvwinch(win, y0, x1 - 1); - mvwaddstr(win, y0, x0, " Press any key to continue"); + MvWAddStr(win, y0, x0, " Press any key to continue"); wclrtoeol(win); getyx(win, y0, x0); - mvwaddch(win, y0, x1 - 1, save); + MvWAddCh(win, y0, x1 - 1, save); wmove(win, y0, x0); raw(); @@ -185,9 +205,9 @@ introTest(WINDOW *win) box(win, ACS_VLINE, ACS_HLINE); wrefresh(win); cbreak(); - mvwaddstr(win, 1, 1, - "You should have rectangle in the middle of the screen"); - mvwaddstr(win, 2, 1, "You should have heard a beep"); + MvWAddStr(win, 1, 1, + "You should have rectangle in the middle of the screen"); + MvWAddStr(win, 2, 1, "You should have heard a beep"); Continue(win); return; } @@ -197,13 +217,13 @@ scrollTest(WINDOW *win) { int i; int half; - int OldX, OldY; + int OldY; NCURSES_CONST char *Message = "The window will now scroll slowly"; wclear(win); - getmaxyx(win, OldY, OldX); + OldY = getmaxy(win); half = OldY / 2; - mvwprintw(win, OldY - 2, 1, Message); + MvWAddStr(win, OldY - 2, 1, Message); wrefresh(win); scrollok(win, TRUE); for (i = 1; i <= OldY; i++) { @@ -214,9 +234,9 @@ scrollTest(WINDOW *win) werase(win); for (i = 1; i < OldY; i++) { - mvwprintw(win, i, 1, "Line %d", i); + MvWPrintw(win, i, 1, "Line %d", i); } - mvwprintw(win, OldY - 2, 1, "The top of the window will scroll"); + MvWPrintw(win, OldY - 2, 1, "The top of the window will scroll"); wmove(win, 1, 1); wsetscrreg(win, 0, half - 1); box(win, ACS_VLINE, ACS_HLINE); @@ -230,9 +250,9 @@ scrollTest(WINDOW *win) werase(win); for (i = 1; i < OldY; i++) { - mvwprintw(win, i, 1, "Line %d", i); + MvWPrintw(win, i, 1, "Line %d", i); } - mvwprintw(win, 1, 1, "The bottom of the window will scroll"); + MvWPrintw(win, 1, 1, "The bottom of the window will scroll"); wmove(win, OldY - 2, 1); wsetscrreg(win, half, --OldY); box(win, ACS_VLINE, ACS_HLINE); @@ -249,6 +269,8 @@ scrollTest(WINDOW *win) static void inputTest(WINDOW *win) { + int answered; + int repeat; int w, h, bx, by, sw, sh, i, c, num; char buffer[80]; WINDOW *subWin; @@ -264,7 +286,7 @@ inputTest(WINDOW *win) #ifdef A_COLOR if (has_colors()) { init_pair(2, COLOR_WHITE, COLOR_RED); - wbkgd(subWin, COLOR_PAIR(2) | A_BOLD); + wbkgd(subWin, (chtype) COLOR_PAIR(2) | A_BOLD); } else wbkgd(subWin, A_BOLD); #else @@ -274,14 +296,14 @@ inputTest(WINDOW *win) wrefresh(win); nocbreak(); - mvwaddstr(win, 2, 1, "Press some keys for 5 seconds"); - mvwaddstr(win, 1, 1, "Pressing ^C should do nothing"); + MvWAddStr(win, 2, 1, "Press some keys for 5 seconds"); + MvWAddStr(win, 1, 1, "Pressing ^C should do nothing"); wrefresh(win); werase(subWin); box(subWin, ACS_VLINE, ACS_HLINE); for (i = 0; i < 5; i++) { - mvwprintw(subWin, 1, 1, "Time = %d", i); + MvWPrintw(subWin, 1, 1, "Time = %d", i); wrefresh(subWin); napms(1000); flushinp(); @@ -293,7 +315,7 @@ inputTest(WINDOW *win) wrefresh(win); napms(500); - mvwaddstr(win, 2, 1, "Press a key, followed by ENTER"); + MvWAddStr(win, 2, 1, "Press a key, followed by ENTER"); wmove(win, 9, 10); wrefresh(win); echo(); @@ -303,21 +325,30 @@ inputTest(WINDOW *win) wmove(win, 9, 10); wdelch(win); - mvwaddstr(win, 4, 1, "The character should now have been deleted"); + MvWAddStr(win, 4, 1, "The character should now have been deleted"); Continue(win); wclear(win); - mvwaddstr(win, 1, 1, "Press keys (or mouse buttons) to show their names"); - mvwaddstr(win, 2, 1, "Press spacebar to finish"); + MvWAddStr(win, 1, 1, "Press keys (or mouse buttons) to show their names"); + MvWAddStr(win, 2, 1, "Press spacebar to finish"); wrefresh(win); + keypad(win, TRUE); raw(); noecho(); + +#if HAVE_TYPEAHEAD typeahead(-1); +#endif + +#ifdef NCURSES_MOUSE_VERSION + mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0); +#endif #if defined(PDCURSES) mouse_set(ALL_MOUSE_EVENTS); #endif - while (1) { + + for (;;) { wmove(win, 3, 5); c = wgetch(win); wclrtobot(win); @@ -326,9 +357,39 @@ inputTest(WINDOW *win) else if (isprint(c)) wprintw(win, "Key Pressed: %c", c); else - wprintw(win, "Key Pressed: %s", unctrl(c)); -#if defined(PDCURSES) + wprintw(win, "Key Pressed: %s", unctrl(UChar(c))); +#ifdef KEY_MOUSE if (c == KEY_MOUSE) { +#if defined(NCURSES_MOUSE_VERSION) +#define ButtonChanged(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, 037)) +#define ButtonPressed(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED)) +#define ButtonDouble(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED)) +#define ButtonTriple(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED)) +#define ButtonRelease(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED)) + MEVENT event; + int button = 0; + + getmouse(&event); + if (ButtonChanged(1)) + button = 1; + else if (ButtonChanged(2)) + button = 2; + else if (ButtonChanged(3)) + button = 3; + else + button = 0; + wmove(win, 4, 18); + wprintw(win, "Button %d: ", button); + if (ButtonPressed(button)) + wprintw(win, "pressed: "); + else if (ButtonDouble(button)) + wprintw(win, "double: "); + else if (ButtonTriple(button)) + wprintw(win, "triple: "); + else + wprintw(win, "released: "); + wprintw(win, " Position: Y: %d X: %d", event.y, event.x); +#elif defined(PDCURSES) int button = 0; request_mouse_pos(); if (BUTTON_CHANGED(1)) @@ -350,8 +411,9 @@ inputTest(WINDOW *win) else wprintw(win, "released: "); wprintw(win, " Position: Y: %d X: %d", MOUSE_Y_POS, MOUSE_X_POS); +#endif /* NCURSES_VERSION vs PDCURSES */ } -#endif +#endif /* KEY_MOUSE */ wrefresh(win); if (c == ' ') break; @@ -365,20 +427,40 @@ inputTest(WINDOW *win) mouse_set(0L); #endif refresh(); - wclear(win); - mvwaddstr(win, 3, 2, "The window should have moved"); - mvwaddstr(win, 4, 2, - "This text should have appeared without you pressing a key"); - mvwaddstr(win, 6, 2, "Enter a number then a string separated by space"); - mvwin(win, 2, 1); - wrefresh(win); - echo(); - noraw(); - num = 0; - *buffer = 0; - mvwscanw(win, 7, 6, "%d %s", &num, buffer); - mvwprintw(win, 8, 6, "String: %s Number: %d", buffer, num); - Continue(win); + + repeat = 0; + do { + static const char *fmt[] = + { + "%d %10s", + "%d %[a-zA-Z]s", + "%d %[][a-zA-Z]s", + "%d %[^0-9]" + }; + char *format = strdup(fmt[(unsigned) repeat % SIZEOF(fmt)]); + + wclear(win); + MvWAddStr(win, 3, 2, "The window should have moved"); + MvWAddStr(win, 4, 2, + "This text should have appeared without you pressing a key"); + MvWPrintw(win, 6, 2, + "Scanning with format \"%s\"", format); + mvwin(win, 2 + 2 * (repeat % 4), 1 + 2 * (repeat % 4)); + erase(); + refresh(); + wrefresh(win); + echo(); + noraw(); + num = 0; + *buffer = 0; + answered = mvwscanw(win, 7, 6, format, &num, buffer); + MvWPrintw(win, 8, 6, + "String: %s Number: %d (%d values read)", + buffer, num, answered); + Continue(win); + ++repeat; + free(format); + } while (answered > 0); } static void @@ -389,10 +471,21 @@ outputTest(WINDOW *win) chtype ch; int by, bx; +#if !HAVE_TIGETSTR +#if HAVE_TGETENT + char tc_buffer[4096]; + char tc_parsed[4096]; + char *area_pointer = tc_parsed; + tgetent(tc_buffer, getenv("TERM")); +#else +#define tgetstr(a,b) 0 +#endif +#endif /* !HAVE_TIGETSTR */ + nl(); wclear(win); - mvwaddstr(win, 1, 1, - "You should now have a screen in the upper left corner, and this text should have wrapped"); + MvWAddStr(win, 1, 1, + "You should now have a screen in the upper left corner, and this text should have wrapped"); mvwin(win, 2, 1); waddstr(win, "\nThis text should be down\n"); waddstr(win, "and broken into two here ^"); @@ -400,17 +493,17 @@ outputTest(WINDOW *win) wclear(win); wattron(win, A_BOLD); - mvwaddstr(win, 1, 1, "A new window will appear with this text in it"); - mvwaddstr(win, 8, 1, "Press any key to continue"); + MvWAddStr(win, 1, 1, "A new window will appear with this text in it"); + MvWAddStr(win, 8, 1, "Press any key to continue"); wrefresh(win); wgetch(win); getbegyx(win, by, bx); if (LINES < 24 || COLS < 75) { - mvwaddstr(win, 5, 1, - "Some tests have been skipped as they require a"); - mvwaddstr(win, 6, 1, "display of at least 24 LINES by 75 COLUMNS"); + MvWAddStr(win, 5, 1, + "Some tests have been skipped as they require a"); + MvWAddStr(win, 6, 1, "display of at least 24 LINES by 75 COLUMNS"); Continue(win); } else { win1 = newwin(10, 50, 14, 25); @@ -421,15 +514,15 @@ outputTest(WINDOW *win) #ifdef A_COLOR if (has_colors()) { init_pair(3, COLOR_BLUE, COLOR_WHITE); - wbkgd(win1, COLOR_PAIR(3)); + wbkgd(win1, (chtype) COLOR_PAIR(3)); } else wbkgd(win1, A_NORMAL); #else wbkgd(win1, A_NORMAL); #endif wclear(win1); - mvwaddstr(win1, 5, 1, - "This text should appear; using overlay option"); + MvWAddStr(win1, 5, 1, + "This text should appear; using overlay option"); copywin(win, win1, 0, 0, 0, 0, 9, 49, TRUE); #if defined(PDCURSES) && !defined(XCURSES) @@ -443,8 +536,8 @@ outputTest(WINDOW *win) wclear(win1); wattron(win1, A_BLINK); - mvwaddstr(win1, 4, 1, - "This blinking text should appear in only the second window"); + MvWAddStr(win1, 4, 1, + "This blinking text should appear in only the second window"); wattroff(win1, A_BLINK); mvwin(win1, by, bx); overlay(win, win1); @@ -458,14 +551,14 @@ outputTest(WINDOW *win) clear(); wclear(win); wrefresh(win); - mvwaddstr(win, 6, 2, "This line shouldn't appear"); - mvwaddstr(win, 4, 2, "Only half of the next line is visible"); - mvwaddstr(win, 5, 2, "Only half of the next line is visible"); + MvWAddStr(win, 6, 2, "This line shouldn't appear"); + MvWAddStr(win, 4, 2, "Only half of the next line is visible"); + MvWAddStr(win, 5, 2, "Only half of the next line is visible"); wmove(win, 6, 1); wclrtobot(win); wmove(win, 5, 20); wclrtoeol(win); - mvwaddstr(win, 8, 2, "This line also shouldn't appear"); + MvWAddStr(win, 8, 2, "This line also shouldn't appear"); wmove(win, 8, 1); wdeleteln(win); Continue(win); @@ -479,19 +572,21 @@ outputTest(WINDOW *win) winsch(win, ch); Continue(win); - mvwinsstr(win, 6, 2, "A1B2C3D4E5"); +#if HAVE_WINSSTR + (void) mvwinsstr(win, 6, 2, "A1B2C3D4E5"); Continue(win); +#endif wmove(win, 5, 1); winsertln(win); - mvwaddstr(win, 5, 2, "The lines below should have moved down"); + MvWAddStr(win, 5, 2, "The lines below should have moved down"); Continue(win); wclear(win); wmove(win, 2, 2); wprintw(win, "This is a formatted string in a window: %d %s\n", 42, - "is it"); - mvwaddstr(win, 10, 1, "Enter a string: "); + "is it"); + MvWAddStr(win, 10, 1, "Enter a string: "); wrefresh(win); noraw(); echo(); @@ -499,35 +594,35 @@ outputTest(WINDOW *win) wscanw(win, "%s", Buffer); printw("This is a formatted string in stdscr: %d %s\n", 42, "is it"); - mvaddstr(10, 1, "Enter a string: "); + MvAddStr(10, 1, "Enter a string: "); *Buffer = 0; scanw("%s", Buffer); - if (tigetstr("cvvis") != 0) { + if (TIGETSTR("cvvis", "vs") != 0) { wclear(win); curs_set(2); - mvwaddstr(win, 1, 1, "The cursor should appear as a block (visible)"); + MvWAddStr(win, 1, 1, "The cursor should appear as a block (visible)"); Continue(win); } - if (tigetstr("civis") != 0) { + if (TIGETSTR("civis", "vi") != 0) { wclear(win); curs_set(0); - mvwaddstr(win, 1, 1, - "The cursor should have disappeared (invisible)"); + MvWAddStr(win, 1, 1, + "The cursor should have disappeared (invisible)"); Continue(win); } - if (tigetstr("cnorm") != 0) { + if (TIGETSTR("cnorm", "ve") != 0) { wclear(win); curs_set(1); - mvwaddstr(win, 1, 1, "The cursor should be an underline (normal)"); + MvWAddStr(win, 1, 1, "The cursor should be an underline (normal)"); Continue(win); } #ifdef A_COLOR if (has_colors()) { wclear(win); - mvwaddstr(win, 1, 1, "Colors should change after you press a key"); + MvWAddStr(win, 1, 1, "Colors should change after you press a key"); Continue(win); init_pair(1, COLOR_RED, COLOR_WHITE); wrefresh(win); @@ -535,19 +630,22 @@ outputTest(WINDOW *win) #endif werase(win); - mvwaddstr(win, 1, 1, "Information About Your Terminal"); - mvwaddstr(win, 3, 1, termname()); - mvwaddstr(win, 4, 1, longname()); + +#if HAVE_TERMNAME + MvWAddStr(win, 1, 1, "Information About Your Terminal"); + MvWAddStr(win, 3, 1, termname()); + MvWAddStr(win, 4, 1, longname()); if (termattrs() & A_BLINK) - mvwaddstr(win, 5, 1, "This terminal supports blinking."); + MvWAddStr(win, 5, 1, "This terminal supports blinking."); else - mvwaddstr(win, 5, 1, "This terminal does NOT support blinking."); + MvWAddStr(win, 5, 1, "This terminal does NOT support blinking."); +#endif - mvwaddnstr(win, 7, 5, "Have a nice day!ok", 16); + (void) mvwaddnstr(win, 7, 5, "Have a nice day!ok", 16); wrefresh(win); - mvwinnstr(win, 7, 5, Buffer, 18); - mvaddstr(LINES - 2, 10, Buffer); + (void) mvwinnstr(win, 7, 5, Buffer, 18); + MvAddStr(LINES - 2, 10, Buffer); refresh(); Continue(win); } @@ -581,13 +679,13 @@ resizeTest(WINDOW *dummy GCC_UNUSED) #endif wclear(win1); - mvwaddstr(win1, 1, 1, "The screen may now have 50 lines"); + MvWAddStr(win1, 1, 1, "The screen may now have 50 lines"); Continue(win1); wclear(win1); resetty(); - mvwaddstr(win1, 1, 1, "The screen should now be reset"); + MvWAddStr(win1, 1, 1, "The screen should now be reset"); Continue(win1); delwin(win1); @@ -603,55 +701,62 @@ padTest(WINDOW *dummy GCC_UNUSED) { WINDOW *pad, *spad; - pad = newpad(50, 100); - wattron(pad, A_REVERSE); - mvwaddstr(pad, 5, 2, "This is a new pad"); - wattrset(pad, A_NORMAL); - mvwaddstr(pad, 8, 0, - "The end of this line should be truncated here:except now"); - mvwaddstr(pad, 11, 1, "This line should not appear.It will now"); - wmove(pad, 10, 1); - wclrtoeol(pad); - mvwaddstr(pad, 10, 1, " Press any key to continue"); - prefresh(pad, 0, 0, 0, 0, 10, 45); - keypad(pad, TRUE); - raw(); - wgetch(pad); + if ((pad = newpad(50, 100)) != 0) { + wattron(pad, A_REVERSE); + MvWAddStr(pad, 5, 2, "This is a new pad"); + (void) wattrset(pad, A_NORMAL); + MvWAddStr(pad, 8, 0, + "The end of this line should be truncated here:except now"); + MvWAddStr(pad, 11, 1, "This line should not appear.It will now"); + wmove(pad, 10, 1); + wclrtoeol(pad); + MvWAddStr(pad, 10, 1, " Press any key to continue"); + prefresh(pad, 0, 0, 0, 0, 10, 45); + keypad(pad, TRUE); + raw(); + wgetch(pad); - spad = subpad(pad, 12, 25, 6, 52); - mvwaddstr(spad, 2, 2, "This is a new subpad"); - box(spad, 0, 0); - prefresh(pad, 0, 0, 0, 0, 15, 75); - keypad(pad, TRUE); - raw(); - wgetch(pad); + if ((spad = subpad(pad, 12, 25, 6, 52)) != 0) { + MvWAddStr(spad, 2, 2, "This is a new subpad"); + box(spad, 0, 0); + delwin(spad); + } + prefresh(pad, 0, 0, 0, 0, 15, 75); + keypad(pad, TRUE); + raw(); + wgetch(pad); - mvwaddstr(pad, 35, 2, "This is displayed at line 35 in the pad"); - mvwaddstr(pad, 40, 1, " Press any key to continue"); - prefresh(pad, 30, 0, 0, 0, 10, 45); - keypad(pad, TRUE); - raw(); - wgetch(pad); + MvWAddStr(pad, 35, 2, "This is displayed at line 35 in the pad"); + MvWAddStr(pad, 40, 1, " Press any key to continue"); + prefresh(pad, 30, 0, 0, 0, 10, 45); + keypad(pad, TRUE); + raw(); + wgetch(pad); - delwin(pad); + delwin(pad); + } } static void display_menu(int old_option, int new_option) { - register size_t i; - - attrset(A_NORMAL); - mvaddstr(3, 20, "PDCurses Test Program"); - - for (i = 0; i < MAX_OPTIONS; i++) - mvaddstr(5 + i, 25, command[i].text); - if (old_option != (-1)) - mvaddstr(5 + old_option, 25, command[old_option].text); - attrset(A_REVERSE); - mvaddstr(5 + new_option, 25, command[new_option].text); - attrset(A_NORMAL); - mvaddstr(13, 3, - "Use Up and Down Arrows to select - Enter to run - Q to quit"); + int i; + + assert((new_option >= 0) && (new_option < MAX_OPTIONS)); + + (void) attrset(A_NORMAL); + MvAddStr(3, 20, "PDCurses Test Program"); + + for (i = 0; i < (int) MAX_OPTIONS; i++) + MvAddStr(5 + i, 25, command[i].text); + + if ((old_option >= 0) && (old_option < MAX_OPTIONS)) + MvAddStr(5 + old_option, 25, command[old_option].text); + + (void) attrset(A_REVERSE); + MvAddStr(5 + new_option, 25, command[new_option].text); + (void) attrset(A_NORMAL); + MvAddStr(13, 3, + "Use Up and Down Arrows to select - Enter to run - Q to quit"); refresh(); }