~ubuntu-branches/debian/sid/ncurses/sid-200908151531

« back to all changes in this revision

Viewing changes to ncurses/base/lib_slkclear.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-11-05 21:34:00 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20081105213400-7d9r3jj2ngz18k24
Tags: 5.7-1
* Merging upstream version 5.7.
* Updating soname and sodepver to 5.7 in rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
 
 * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
 
2
 * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
3
3
 *                                                                          *
4
4
 * Permission is hereby granted, free of charge, to any person obtaining a  *
5
5
 * copy of this software and associated documentation files (the            *
40
40
 */
41
41
#include <curses.priv.h>
42
42
 
43
 
MODULE_ID("$Id: lib_slkclear.c,v 1.12 2009/02/21 17:47:14 tom Exp $")
 
43
MODULE_ID("$Id: lib_slkclear.c,v 1.10 2007/12/29 17:51:47 tom Exp $")
44
44
 
45
45
NCURSES_EXPORT(int)
46
 
NCURSES_SP_NAME(slk_clear) (NCURSES_SP_DCL0)
 
46
slk_clear(void)
47
47
{
48
48
    int rc = ERR;
49
49
 
50
 
    T((T_CALLED("slk_clear(%p)"), SP_PARM));
 
50
    T((T_CALLED("slk_clear()")));
51
51
 
52
 
    if (SP_PARM != 0 && SP_PARM->_slk != 0) {
53
 
        SP_PARM->_slk->hidden = TRUE;
 
52
    if (SP != NULL && SP->_slk != NULL) {
 
53
        SP->_slk->hidden = TRUE;
54
54
        /* For simulated SLK's it looks much more natural to
55
55
           inherit those attributes from the standard screen */
56
 
        SP_PARM->_slk->win->_nc_bkgd = SP_PARM->_stdscr->_nc_bkgd;
57
 
        WINDOW_ATTRS(SP_PARM->_slk->win) = WINDOW_ATTRS(SP_PARM->_stdscr);
58
 
        if (SP_PARM->_slk->win == SP_PARM->_stdscr) {
 
56
        SP->_slk->win->_nc_bkgd = stdscr->_nc_bkgd;
 
57
        WINDOW_ATTRS(SP->_slk->win) = WINDOW_ATTRS(stdscr);
 
58
        if (SP->_slk->win == stdscr) {
59
59
            rc = OK;
60
60
        } else {
61
 
            werase(SP_PARM->_slk->win);
62
 
            rc = wrefresh(SP_PARM->_slk->win);
 
61
            werase(SP->_slk->win);
 
62
            rc = wrefresh(SP->_slk->win);
63
63
        }
64
64
    }
65
65
    returnCode(rc);
66
66
}
67
 
 
68
 
#if NCURSES_SP_FUNCS
69
 
NCURSES_EXPORT(int)
70
 
slk_clear(void)
71
 
{
72
 
    return NCURSES_SP_NAME(slk_clear) (CURRENT_SCREEN);
73
 
}
74
 
#endif