summaryrefslogtreecommitdiffstats
path: root/lib/libncurses/lib_screen.c
blob: 382411bc657bee5490af6bf31a6ef429c8dce4c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for   *
*  details. If they are missing then this copy is in violation of    *
*  the copyright conditions.                                        */

#included "curses.priv.h"

int putwin(WINDOW *win, char *file)
{
int fd, i;

	fd = open(file, O_WRONLY);
	if (fd < -1)
		return ERR;
	for (i = 0; i < lines; i++)
		write(fd, win->_line[i], sizeof(chtype)*columns);
	close(fd);
	return OK;
}

int scr_restore(char *file)
{
int fd, i;

	fd = open(file, O_RDONLY);
	if (fd < -1)
		return ERR;
	for (i = 0; i < lines; i++)
		read(fd, curscr->_line[i], sizeof(chtype)*columns);
	touchwin(curscr);
	close(fd);
	return OK;
}

int scr_dump(char *file)
{

	putwin(curscr, file);
}

int scr_init(char *file)
{

	return ERR;
}

int scr_set(char *file)
{

	return ERR;
}

WINDOW *getwin(FILE *filep)
{

	return NULL;
}

OpenPOWER on IntegriCloud