X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fncurses.c;h=df2d064c393c488fbda6a3371b3ee01761929cf4;hp=5a422cf1a8cd5f92f7dbb048f3a7c3749e551e27;hb=c120fddebe9e9c1e2b29dbd744a6b1d03652bf8b;hpb=70322aa06a4a97ebff76d2869ad923cdf51ee0a9 diff --git a/test/ncurses.c b/test/ncurses.c index 5a422cf1..df2d064c 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.365 2011/01/22 19:48:33 tom Exp $ +$Id: ncurses.c,v 1.368 2011/05/21 18:50:56 tom Exp $ ***************************************************************************/ @@ -490,7 +490,7 @@ ShellOut(bool message) #ifdef __MINGW32__ system("cmd.exe"); #else - system("sh"); + IGNORE_RC(system("sh")); #endif if (message) addstr("returned from shellout.\n"); @@ -777,7 +777,7 @@ resize_boxes(unsigned level, WINDOW *win) } doupdate(); } -#endif /* resize_boxes */ +#endif /* resize_boxes */ #else #define forget_boxes() /* nothing */ #define remember_boxes(level,text,frame) /* nothing */ @@ -1394,7 +1394,7 @@ show_attr(int row, int skip, bool arrow, chtype attr, const char *name) if (!(termattrs() & test)) { printw(" (N/A)"); } else { - if (ncv > 0 && (getbkgd(stdscr) & A_COLOR)) { + if (ncv > 0 && stdscr && (getbkgd(stdscr) & A_COLOR)) { static const chtype table[] = { A_STANDOUT, @@ -4269,8 +4269,10 @@ acs_and_scroll(void) neww->next = current ? current->next : 0; neww->last = current; - neww->last->next = neww; - neww->next->last = neww; + if (neww->last != 0) + neww->last->next = neww; + if (neww->next != 0) + neww->next->last = neww; neww->wind = getwin(fp); @@ -6772,7 +6774,7 @@ main(int argc, char *argv[]) use_default_colors(); min_colors = -1; } -#if NCURSES_VERSION_PATCH >= 20000708 +#if HAVE_ASSUME_DEFAULT_COLORS if (assumed_colors) assume_default_colors(default_fg, default_bg); #endif