iPXE
lineconsole.h
Go to the documentation of this file.
00001 #ifndef _IPXE_LINECONSOLE_H
00002 #define _IPXE_LINECONSOLE_H
00003 
00004 /** @file
00005  *
00006  * Line-based console
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00011 
00012 #include <stdint.h>
00013 #include <ipxe/ansiesc.h>
00014 
00015 /** A line-based console */
00016 struct line_console {
00017         /** Data buffer
00018          *
00019          * Must initially be filled with NULs
00020          */
00021         char *buffer;
00022         /** Current index within buffer */
00023         size_t index;
00024         /** Length of buffer
00025          *
00026          * The final character of the buffer will only ever be used as
00027          * a potential terminating NUL.
00028          */
00029         size_t len;
00030         /** ANSI escape sequence context */
00031         struct ansiesc_context ctx;
00032 };
00033 
00034 extern size_t line_putchar ( struct line_console *line, int character );
00035 
00036 #endif /* _IPXE_LINECONSOLE_H */