iPXE
print_nadv.c
Go to the documentation of this file.
1#include <curses.h>
2#include "mucurses.h"
3#include "cursor.h"
4
5/** @file
6 *
7 * MuCurses printing functions (no cursor advance)
8 *
9 */
10
11FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
12
13/**
14 * Add string of single-byte characters and renditions to a window
15 *
16 * @v *win window to be rendered in
17 * @v *chstr pointer to first chtype in "string"
18 * @v n max number of chars from chstr to render
19 * @ret rc return status code
20 */
21int waddchnstr ( WINDOW *win, const chtype *chstr, int n ) {
22 struct cursor_pos pos;
23
24 _store_curs_pos( win, &pos );
25 _wputchstr( win, chstr, NOWRAP, n );
26 _restore_curs_pos( win, &pos );
27 return OK;
28}
MuCurses header file.
uint32_t chtype
Definition curses.h:30
#define OK
Definition curses.h:25
struct _curses_window WINDOW
Curses Window struct.
MuCurses cursor implementation specific header file.
static void _store_curs_pos(WINDOW *win, struct cursor_pos *pos)
Store cursor position for later restoration.
Definition cursor.h:33
static void _restore_curs_pos(WINDOW *win, struct cursor_pos *pos)
Restore cursor position from encoded backup variable.
Definition cursor.h:23
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
void _wputchstr(WINDOW *win, const chtype *chstr, int wrap, int n) __nonnull
Write a chtype string to a window.
Definition mucurses.c:108
MuCurses core implementation specific header file.
#define NOWRAP
Definition mucurses.h:14
int waddchnstr(WINDOW *win, const chtype *chstr, int n)
Add string of single-byte characters and renditions to a window.
Definition print_nadv.c:21