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 12 #include <stdint.h> 13 #include <ipxe/ansiesc.h> 14 15 /** A line-based console */ 16 struct line_console { 17 /** Data buffer 18 * 19 * Must initially be filled with NULs 20 */ 21 char *buffer; 22 /** Current index within buffer */ 23 size_t index; 24 /** Length of buffer 25 * 26 * The final character of the buffer will only ever be used as 27 * a potential terminating NUL. 28 */ 29 size_t len; 30 /** ANSI escape sequence context */ 31 struct ansiesc_context ctx; 32 }; 33 34 extern size_t line_putchar ( struct line_console *line, int character ); 35 36 #endif /* _IPXE_LINECONSOLE_H */ 37