Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / hci / mucurses / wininit.c
1 #include <stddef.h>
2 #include <curses.h>
3
4 /** @file
5  *
6  * MuCurses initialisation functions
7  *
8  */
9
10 FILE_LICENCE ( GPL2_OR_LATER );
11
12 /**
13  * Initialise console environment
14  *
15  * @ret *win    return pointer to stdscr
16  */
17 WINDOW *initscr ( void ) {
18         /* determine console size */
19         /* initialise screen */
20         stdscr->scr->init( stdscr->scr );
21         stdscr->height = LINES;
22         stdscr->width = COLS;
23         move ( 0, 0 );
24         return stdscr;
25 }
26
27 /**
28  * Finalise console environment
29  *
30  */
31 int endwin ( void ) {
32         attrset ( 0 );
33         color_set ( 0, NULL );
34         curs_set ( 1 );
35         mvprintw ( ( LINES - 1 ), 0, "\n" );
36         stdscr->scr->exit( stdscr->scr );
37         return OK;
38 }