home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
PROGRAM
/
AECUR100.ZIP
/
CONTRIB
/
CURSES
/
SRC
/
SAVESCR.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-08
|
748b
|
44 lines
/*----------------------------------------------------------------------
*
* savescr.c
*
* copyright (c) 1987,88,89,90 J. Alan Eldridge
*
* save and restore an area of curscr, including cursor position
*
*----------------------------------------------------------------------
*/
#include "curses.h"
WINDOW *newwin();
WINDOW *
savescr(r,c,y,x)
{
WINDOW *win;
win = newwin(r,c,y,x);
if (win) {
overwrite(curscr, win);
getyx(curscr, y, x);
wmove(win, y, x);
}
return win;
}
void
restscr(win)
WINDOW *win;
{
int y, x;
getyx(win, y, x);
wmove(win, 0, 0);
wrefresh(win);
wmove(curscr, y, x);
mvcur(0, 0, y, x);
}