iPXE
wininit.c File Reference

MuCurses initialisation functions. More...

#include <stddef.h>
#include <curses.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
WINDOWinitscr (void)
 Initialise console environment.
int endwin (void)
 Finalise console environment.

Detailed Description

MuCurses initialisation functions.

Definition in file wininit.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ initscr()

WINDOW * initscr ( void )

Initialise console environment.

Return values
*winreturn pointer to stdscr

Definition at line 18 of file wininit.c.

18 {
19 /* determine console size */
20 /* initialise screen */
21 stdscr->scr->init( stdscr->scr );
22 stdscr->height = LINES;
23 stdscr->width = COLS;
24 move ( 0, 0 );
25 return stdscr;
26}
#define stdscr
Definition curses.h:111
static int move(int y, int x)
Definition curses.h:594
#define LINES(...)
Define inline lines.
#define COLS
Definition vga.h:27

References COLS, LINES, move(), and stdscr.

Referenced by pxe_menu_select(), settings_ui(), show_form(), and show_menu().

◆ endwin()

int endwin ( void )

Finalise console environment.

Definition at line 32 of file wininit.c.

32 {
33 attrset ( 0 );
34 color_set ( 0, NULL );
35 curs_set ( 1 );
36 mvprintw ( ( LINES - 1 ), 0, "\n" );
37 stdscr->scr->exit( stdscr->scr );
38 return OK;
39}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
static int attrset(int attrs)
Definition curses.h:517
#define mvprintw(y, x, fmt,...)
Definition curses.h:649
#define OK
Definition curses.h:25
#define color_set(cpno, opts)
Definition curses.h:241
int curs_set(int visibility)
Set cursor visibility.
Definition mucurses.c:154

References attrset(), color_set, curs_set(), LINES, mvprintw, NULL, OK, and stdscr.

Referenced by pxe_menu_select(), settings_ui(), show_form(), and show_menu().