51 for ( handler = handlers ; handler->
function ; handler++ ) {
77 if (
ctx->count == 0 ) {
91 }
else if ( ( c >=
'0' ) && ( c <=
'9' ) ) {
97 }
else if ( c ==
';' ) {
100 if (
ctx->count > ( sizeof (
ctx->params ) /
101 sizeof (
ctx->params[0] ) ) ) {
104 DBG (
"Too many parameters in ANSI escape "
107 }
else if ( ( ( c >= 0x20 ) && ( c <= 0x2f ) ) ||
struct golan_eq_context ctx
static void ansiesc_call_handler(struct ansiesc_context *ctx, unsigned int function, int count, int params[])
Call ANSI escape sequence handler.
int ansiesc_process(struct ansiesc_context *ctx, int c)
Process character that may be part of ANSI escape sequence.
#define ESC
Escape character.
uint8_t function
Function.
#define DBG(...)
Print a debugging message.
static unsigned int count
Number of entries.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
struct hv_monitor_parameter param[4][32]
Parameters.
void * memset(void *dest, int character, size_t len) __nonnull
ANSI escape sequence context.
A handler for an escape sequence.
void(* handle)(struct ansiesc_context *ctx, unsigned int count, int params[])
Handle escape sequence.
unsigned int function
The control function identifier.