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

« back to all changes in this revision

Viewing changes to ncurses/base/lib_endwin.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-05-24 15:13:01 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090524151301-uixgxq2zonfov2nr
Tags: 5.7+20090523-1
MergingĀ upstreamĀ versionĀ 5.7+20090523.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
 
 * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
 
2
 * Copyright (c) 1998-2000,2009 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            *
29
29
/****************************************************************************
30
30
 *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
31
31
 *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
 
32
 *     and: Thomas E. Dickey                        1996-on                 *
 
33
 *     and: Juergen Pfeifer                         2009                    *
32
34
 ****************************************************************************/
33
35
 
34
36
/*
41
43
#include <curses.priv.h>
42
44
#include <term.h>
43
45
 
44
 
MODULE_ID("$Id: lib_endwin.c,v 1.19 2000/12/10 02:43:27 tom Exp $")
 
46
MODULE_ID("$Id: lib_endwin.c,v 1.20 2009/02/15 00:35:00 tom Exp $")
45
47
 
46
48
NCURSES_EXPORT(int)
47
 
endwin(void)
 
49
NCURSES_SP_NAME(endwin) (NCURSES_SP_DCL0)
48
50
{
49
51
    T((T_CALLED("endwin()")));
50
52
 
51
 
    if (SP) {
52
 
        SP->_endwin = TRUE;
53
 
        SP->_mouse_wrap(SP);
 
53
    if (SP_PARM) {
 
54
        SP_PARM->_endwin = TRUE;
 
55
        SP_PARM->_mouse_wrap(SP_PARM);
54
56
        _nc_screen_wrap();
55
57
        _nc_mvcur_wrap();       /* wrap up cursor addressing */
56
58
        returnCode(reset_shell_mode());
58
60
 
59
61
    returnCode(ERR);
60
62
}
 
63
 
 
64
#if NCURSES_SP_FUNCS
 
65
NCURSES_EXPORT(int)
 
66
endwin(void)
 
67
{
 
68
    return NCURSES_SP_NAME(endwin) (CURRENT_SCREEN);
 
69
}
 
70
#endif