X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=test%2Fncurses.c;h=47125f7a81a3062cd2ebfac70a2a2c69b4f30fb0;hb=94bd28fde2afc88ac80fa4b10894193ef140d29a;hp=b4fb7fab35f179fb5eb371b2baed6de6465e204a;hpb=99c50261a07b29bfad4ab33ebe9f6597558e8c88;p=ncurses.git diff --git a/test/ncurses.c b/test/ncurses.c index b4fb7fab..47125f7a 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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.353 2009/12/20 02:14:17 tom Exp $ +$Id: ncurses.c,v 1.356 2010/03/06 18:45:14 tom Exp $ ***************************************************************************/ @@ -4761,12 +4761,13 @@ panner_legend(int line) "Number repeats. Toggle legend:? filler:a timer:t scrollmark:s." }; int n = ((int) SIZEOF(legend) - (LINES - line)); - if (line < LINES && (n >= 0)) { - move(line, 0); - if (show_panner_legend) - printw("%s", legend[n]); - clrtoeol(); - return show_panner_legend; + if (n >= 0) { + if (move(line, 0) != ERR) { + if (show_panner_legend) + printw("%s", legend[n]); + clrtoeol(); + return show_panner_legend; + } } return FALSE; } @@ -6595,8 +6596,8 @@ main_menu(bool top) (void) fflush(stdout); /* necessary under SVr4 curses */ /* - * This used to be an 'fgets()' call. However (on Linux, at least) - * mixing stream I/O and 'read()' (used in the library) causes the + * This used to be an 'fgets()' call (until 1996/10). However with + * some runtime libraries, mixing stream I/O and 'read()' causes the * input stream to be flushed when switching between the two. */ command = 0;