[console] Pass escape sequence context to ANSI escape sequence handlers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-11-25 14:01:40 +00:00
parent 3102866a7f
commit 02a63c6dec
6 changed files with 36 additions and 14 deletions

View File

@@ -28,6 +28,8 @@
FILE_LICENCE ( GPL2_OR_LATER );
struct ansiesc_context;
/** A handler for an escape sequence */
struct ansiesc_handler {
/** The control function identifier
@@ -42,6 +44,7 @@ struct ansiesc_handler {
unsigned int function;
/** Handle escape sequence
*
* @v ctx ANSI escape context
* @v count Parameter count
* @v params Parameter list
*
@@ -54,7 +57,8 @@ struct ansiesc_handler {
* omitted". Consequently, the parameter list will always
* contain at least one item.
*/
void ( * handle ) ( unsigned int count, int params[] );
void ( * handle ) ( struct ansiesc_context *ctx, unsigned int count,
int params[] );
};
/** Maximum number of parameters within a single escape sequence */