X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fncurses.c;h=0e724a65df0bb51ad52ce834710eb1c13d952ee7;hp=50f24947f45af39f37847e363d91e89bc6755764;hb=d44d7f381ba0173521cb788ba3adb12e261e5c96;hpb=c4d90db4f4e50bb8a971955ce4812262da4a50bc diff --git a/test/ncurses.c b/test/ncurses.c index 50f24947..0e724a65 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -40,7 +40,7 @@ AUTHOR Author: Eric S. Raymond 1993 Thomas E. Dickey (beginning revision 1.27 in 1996). -$Id: ncurses.c,v 1.298 2008/01/12 23:06:58 tom Exp $ +$Id: ncurses.c,v 1.302 2008/02/23 23:07:28 tom Exp $ ***************************************************************************/ @@ -183,14 +183,14 @@ wGetchar(WINDOW *win) while ((c = wgetch(win)) == CTRL('T')) { if (_nc_tracing) { save_trace = _nc_tracing; - _tracef("TOGGLE-TRACING OFF"); + Trace(("TOGGLE-TRACING OFF")); _nc_tracing = 0; } else { _nc_tracing = save_trace; } trace(_nc_tracing); if (_nc_tracing) - _tracef("TOGGLE-TRACING ON"); + Trace(("TOGGLE-TRACING ON")); } #else c = wgetch(win); @@ -276,14 +276,14 @@ wGet_wchar(WINDOW *win, wint_t *result) while ((c = wget_wch(win, result)) == CTRL('T')) { if (_nc_tracing) { save_trace = _nc_tracing; - _tracef("TOGGLE-TRACING OFF"); + Trace(("TOGGLE-TRACING OFF")); _nc_tracing = 0; } else { _nc_tracing = save_trace; } trace(_nc_tracing); if (_nc_tracing) - _tracef("TOGGLE-TRACING ON"); + Trace(("TOGGLE-TRACING ON")); } #else c = wget_wch(win, result); @@ -608,7 +608,7 @@ remember_boxes(unsigned level, WINDOW *txt_win, WINDOW *box_win) winstack[level].frame = box_win; } -#if USE_SOFTKEYS && (NCURSES_VERSION_PATCH < 20071229) +#if USE_SOFTKEYS && (NCURSES_VERSION_PATCH < 20071229) && NCURSES_EXT_FUNCS static void slk_repaint(void) { @@ -850,7 +850,7 @@ getch_test(void) * For wget_wch_test(), we create pairs of windows - one for a box, one for text. * Resize both and paint the box in the parent. */ -#ifdef KEY_RESIZE +#if defined(KEY_RESIZE) && HAVE_WRESIZE static void resize_wide_boxes(unsigned level, WINDOW *win) { @@ -1024,7 +1024,7 @@ wget_wch_test(unsigned level, WINDOW *win, int delay) } else #endif /* NCURSES_MOUSE_VERSION */ if (code == KEY_CODE_YES) { -#ifdef KEY_RESIZE +#if defined(KEY_RESIZE) && HAVE_WRESIZE if (c == KEY_RESIZE) { resize_wide_boxes(level, win); } @@ -1310,7 +1310,7 @@ show_attr(int row, int skip, bool arrow, chtype attr, const char *name) } /* *INDENT-OFF* */ static const struct { - attr_t attr; + chtype attr; NCURSES_CONST char * name; } attrs_to_test[] = { { A_STANDOUT, "STANDOUT" }, @@ -2893,7 +2893,7 @@ acs_display(void) #if USE_WIDEC_SUPPORT static cchar_t * -merge_wide_attr(cchar_t *dst, cchar_t *src, attr_t attr, short pair) +merge_wide_attr(cchar_t *dst, const cchar_t *src, attr_t attr, short pair) { int count = getcchar(src, NULL, NULL, NULL, 0); wchar_t *wch = 0; @@ -3138,7 +3138,7 @@ show_utf8_chars(attr_t attr, short pair) } /* *INDENT-OFF* */ static struct { - attr_t attr; + chtype attr; const char *name; } attrs_to_cycle[] = { { A_NORMAL, "normal" }, @@ -3395,9 +3395,12 @@ FRAME }; #if defined(NCURSES_VERSION) -#if NCURSES_VERSION_PATCH < 20070331 +#if (NCURSES_VERSION_PATCH < 20070331) && NCURSES_EXT_FUNCS #define is_keypad(win) (win)->_use_keypad #define is_scrollok(win) (win)->_scroll +#elif !defined(is_keypad) +#define is_keypad(win) FALSE +#define is_scrollok(win) FALSE #endif #else #define is_keypad(win) FALSE @@ -3684,7 +3687,7 @@ static void acs_and_scroll(void) /* Demonstrate windows */ { - int c, i; + int c; FRAME *current = (FRAME *) 0, *neww; WINDOW *usescr = stdscr; #if HAVE_PUTWIN && HAVE_GETWIN @@ -3797,7 +3800,7 @@ acs_and_scroll(void) case CTRL('X'): /* resize window */ if (current) { pair *tmp, ul, lr; - int mx, my; + int i, mx, my; move(0, 0); clrtoeol(); @@ -4846,7 +4849,7 @@ menu_virtualize(int c) } } -static const char *animals[] = +static CONST_MENUS char *animals[] = { "Lions", "Tigers", @@ -4870,7 +4873,7 @@ menu_test(void) MENU *m; ITEM *items[SIZEOF(animals)]; ITEM **ip = items; - const char **ap; + CONST_MENUS char **ap; int mrows, mcols, c; WINDOW *menuwin; @@ -5076,7 +5079,7 @@ trace_set(void) if (item_value(*ip)) newtrace |= t_tbl[item_index(*ip)].mask; trace(newtrace); - _tracef("trace level interactively set to %s", tracetrace(_nc_tracing)); + Trace(("trace level interactively set to %s", tracetrace(_nc_tracing))); (void) mvprintw(LINES - 2, 0, "Trace level is %s\n", tracetrace(_nc_tracing)); @@ -5927,7 +5930,7 @@ do_single_test(const char c) break; #endif -#if USE_WIDEC_SUPPORT +#if USE_WIDEC_SUPPORT && USE_LIBPANEL case 'O': demo_panels(init_wide_panel, fill_wide_panel); break;