iPXE
lineconsole.h
Go to the documentation of this file.
1 #ifndef _IPXE_LINECONSOLE_H
2 #define _IPXE_LINECONSOLE_H
3 
4 /** @file
5  *
6  * Line-based console
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 FILE_SECBOOT ( PERMITTED );
12 
13 #include <stdint.h>
14 #include <ipxe/ansiesc.h>
15 
16 /** A line-based console */
17 struct line_console {
18  /** Data buffer
19  *
20  * Must initially be filled with NULs
21  */
22  char *buffer;
23  /** Current index within buffer */
24  size_t index;
25  /** Length of buffer
26  *
27  * The final character of the buffer will only ever be used as
28  * a potential terminating NUL.
29  */
30  size_t len;
31  /** ANSI escape sequence context */
33 };
34 
35 extern size_t line_putchar ( struct line_console *line, int character );
36 
37 #endif /* _IPXE_LINECONSOLE_H */
FILE_SECBOOT(PERMITTED)
size_t index
Current index within buffer.
Definition: lineconsole.h:24
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
A line-based console.
Definition: lineconsole.h:17
ANSI escape sequence context.
Definition: ansiesc.h:74
size_t line_putchar(struct line_console *line, int character)
Print a character to a line-based console.
Definition: lineconsole.c:44
size_t len
Length of buffer.
Definition: lineconsole.h:30
ANSI escape sequences.
struct ansiesc_context ctx
ANSI escape sequence context.
Definition: lineconsole.h:32
char * buffer
Data buffer.
Definition: lineconsole.h:22