2
0
mirror of https://github.com/xcat2/xNBA.git synced 2026-03-22 22:49:18 +00:00
Files
xNBA/src/include/ipxe/lineconsole.h
Michael Brown c2875ae329 [console] Do not share ANSI escape context between lineconsole users
An ANSI escape sequence context cannot be shared between multiple
users.  Make the ANSI escape sequence context part of the line console
definition and provide individual contexts for each user.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-26 21:58:50 +01:00

37 lines
679 B
C

#ifndef _IPXE_LINECONSOLE_H
#define _IPXE_LINECONSOLE_H
/** @file
*
* Line-based console
*
*/
FILE_LICENCE ( GPL2_OR_LATER );
#include <stdint.h>
#include <ipxe/ansiesc.h>
/** A line-based console */
struct line_console {
/** Data buffer
*
* Must initially be filled with NULs
*/
char *buffer;
/** Current index within buffer */
size_t index;
/** Length of buffer
*
* The final character of the buffer will only ever be used as
* a potential terminating NUL.
*/
size_t len;
/** ANSI escape sequence context */
struct ansiesc_context ctx;
};
extern size_t line_putchar ( struct line_console *line, int character );
#endif /* _IPXE_LINECONSOLE_H */