1
1
/****************************************************************************
2
* Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
2
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
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 *
30
30
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
31
31
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
32
32
* and: Thomas E. Dickey 1996-on *
33
* and: Juergen Pfeifer 2008 *
34
33
****************************************************************************/
45
44
#define _POSIX_SOURCE
48
MODULE_ID("$Id: lib_restart.c,v 1.11 2009/05/02 20:47:42 tom Exp $")
47
#include <term.h> /* lines, columns, cur_term */
49
MODULE_ID("$Id: lib_restart.c,v 1.10 2008/06/21 17:31:22 tom Exp $")
50
51
NCURSES_EXPORT(int)
51
NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
52
NCURSES_CONST char *termp,
52
restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
58
T((T_CALLED("restartterm(%p,%s,%d,%p)"), SP_PARM, termp, filenum, errret));
56
T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret));
60
58
if (setupterm(termp, filenum, errret) != OK) {
62
} else if (SP_PARM != 0) {
63
int saveecho = SP_PARM->_echo;
64
int savecbreak = SP_PARM->_cbreak;
65
int saveraw = SP_PARM->_raw;
66
int savenl = SP_PARM->_nl;
61
int saveecho = SP->_echo;
62
int savecbreak = SP->_cbreak;
63
int saveraw = SP->_raw;
69
NCURSES_SP_NAME(echo) (NCURSES_SP_ARG);
71
NCURSES_SP_NAME(noecho) (NCURSES_SP_ARG);
75
NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG);
76
NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
77
74
} else if (saveraw) {
78
NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG);
79
NCURSES_SP_NAME(raw) (NCURSES_SP_ARG);
81
NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG);
82
NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
85
NCURSES_SP_NAME(nl) (NCURSES_SP_ARG);
87
NCURSES_SP_NAME(nonl) (NCURSES_SP_ARG);
90
NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_ARG);
93
_nc_update_screensize(SP_PARM);
89
_nc_update_screensize(SP);
100
96
returnCode(result);
105
restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
107
return NCURSES_SP_NAME(restartterm) (CURRENT_SCREEN, termp, filenum, errret);