Last change
on this file was
e16e8f2,
checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago
|
bootstuff
|
-
Property mode set to
100644
|
File size:
607 bytes
|
Line | |
---|
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 | mvprintw ( ( LINES - 1 ), 0, "\n" ); |
---|
35 | stdscr->scr->exit( stdscr->scr ); |
---|
36 | return OK; |
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.