X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_slkclear.c;h=03e6721cbb29c9ee6092edbd3ec334bdf1fcf657;hp=ac6e414beaa26bc5228e565ba91a71188fdde10a;hb=refs%2Ftags%2Fv5.3;hpb=c633e5103a29a38532cf1925257b91cea33fd090 diff --git a/ncurses/base/lib_slkclear.c b/ncurses/base/lib_slkclear.c index ac6e414b..03e6721c 100644 --- a/ncurses/base/lib_slkclear.c +++ b/ncurses/base/lib_slkclear.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000,2001 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 * @@ -38,25 +38,24 @@ */ #include -MODULE_ID("$Id: lib_slkclear.c,v 1.4 1999/03/03 23:44:22 juergen Exp $") +MODULE_ID("$Id: lib_slkclear.c,v 1.8 2001/12/19 01:07:01 tom Exp $") -int +NCURSES_EXPORT(int) slk_clear(void) { - T((T_CALLED("slk_clear()"))); + T((T_CALLED("slk_clear()"))); - if (SP == NULL || SP->_slk == NULL) - returnCode(ERR); - SP->_slk->hidden = TRUE; - /* For simulated SLK's it's looks much more natural to - inherit those attributes from the standard screen */ - SP->_slk->win->_bkgd = stdscr->_bkgd; - SP->_slk->win->_attrs = stdscr->_attrs; - if (SP->_slk->win == stdscr) { - returnCode(OK); - } - else { - werase(SP->_slk->win); - returnCode(wrefresh(SP->_slk->win)); - } + if (SP == NULL || SP->_slk == NULL) + returnCode(ERR); + SP->_slk->hidden = TRUE; + /* For simulated SLK's it's looks much more natural to + inherit those attributes from the standard screen */ + SP->_slk->win->_nc_bkgd = stdscr->_nc_bkgd; + SP->_slk->win->_attrs = stdscr->_attrs; + if (SP->_slk->win == stdscr) { + returnCode(OK); + } else { + werase(SP->_slk->win); + returnCode(wrefresh(SP->_slk->win)); + } }