summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/lineconsole.h
blob: d53a0e9f93df286f0afbb20b0ebd9dd302cf2104 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef _IPXE_LINECONSOLE_H
#define _IPXE_LINECONSOLE_H

/** @file
 *
 * Line-based console
 *
 */

FILE_LICENCE ( GPL2_OR_LATER );

#include <stdint.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;
};

extern size_t line_putchar ( struct line_console *line, int character );

#endif /* _IPXE_LINECONSOLE_H */