X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fncurses.c;h=51bda88410b71386b0ddb4ea333e93ea20f05c4d;hp=91acade3c8daea53b3edaf1c2f0adfd82aa73f3c;hb=b779f5fb4516b3e6d1bc8880ea68923efb761e1d;hpb=8144a95f5729b46a1ad4f4c3c4ba29800304e4c0 diff --git a/test/ncurses.c b/test/ncurses.c index 91acade3..51bda884 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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 * @@ -40,7 +40,7 @@ AUTHOR Author: Eric S. Raymond 1993 Thomas E. Dickey (beginning revision 1.27 in 1996). -$Id: ncurses.c,v 1.296 2007/12/29 21:05:43 tom Exp $ +$Id: ncurses.c,v 1.300 2008/01/19 23:10:59 tom Exp $ ***************************************************************************/ @@ -76,7 +76,7 @@ $Id: ncurses.c,v 1.296 2007/12/29 21:05:43 tom Exp $ #define NCURSES_CONST_PARAM const void #ifdef TRACE -static unsigned save_trace = TRACE_ORDINARY | TRACE_CALLS; +static unsigned save_trace = TRACE_ORDINARY | TRACE_ICALLS | TRACE_CALLS; extern unsigned _nc_tracing; #endif @@ -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); } @@ -2525,6 +2525,7 @@ slk_test(void) #endif #if defined(NCURSES_VERSION) && defined(KEY_RESIZE) && HAVE_WRESIZE case KEY_RESIZE: + wnoutrefresh(stdscr); break; #endif @@ -2655,6 +2656,7 @@ wide_slk_test(void) break; #if defined(NCURSES_VERSION) && defined(KEY_RESIZE) && HAVE_WRESIZE case KEY_RESIZE: + wnoutrefresh(stdscr); break; #endif default: @@ -3393,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 @@ -3682,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 @@ -3795,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();