/****************************************************************************
- * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2006 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 *
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
****************************************************************************/
/*
#include <curses.priv.h>
-MODULE_ID("$Id: lib_refresh.c,v 1.32 2002/05/26 00:17:04 tom Exp $")
+MODULE_ID("$Id: lib_refresh.c,v 1.34 2006/05/27 19:21:19 tom Exp $")
NCURSES_EXPORT(int)
wrefresh(WINDOW *win)
T((T_CALLED("wrefresh(%p)"), win));
- if (win == curscr) {
+ if (win == 0) {
+ code = ERR;
+ } else if (win == curscr) {
curscr->_clear = TRUE;
code = doupdate();
} else if ((code = wnoutrefresh(win)) == OK) {
begy = win->_begy;
newscr->_nc_bkgd = win->_nc_bkgd;
- newscr->_attrs = win->_attrs;
+ WINDOW_ATTRS(newscr) = WINDOW_ATTRS(win);
/* merge in change information from all subwindows of this window */
wsyncdown(win);