mirror of https://github.com/ipxe/ipxe.git
[console] Allow '?' as an intermediate byte in ANSI escape sequences
The ANSI escape sequences to show and hide the cursor take the form "<ESC>[?25h" and "<ESC>[?25l" respectively. iPXE currently treats the '?' character as the final byte. Fix by explicitly treating '?' as an intermediate byte. Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/17/head
parent
1403bda951
commit
135bf35b11
|
@ -99,7 +99,8 @@ int ansiesc_process ( struct ansiesc_context *ctx, int c ) {
|
|||
DBG ( "Too many parameters in ANSI escape "
|
||||
"sequence\n" );
|
||||
}
|
||||
} else if ( ( c >= 0x20 ) && ( c <= 0x2f ) ) {
|
||||
} else if ( ( ( c >= 0x20 ) && ( c <= 0x2f ) ) ||
|
||||
( c == '?' ) ) {
|
||||
/* Intermediate Byte */
|
||||
ctx->function <<= 8;
|
||||
ctx->function |= c;
|
||||
|
|
|
@ -124,6 +124,12 @@ struct ansiesc_context {
|
|||
*/
|
||||
#define ANSIESC_LOG_PRIORITY 'p'
|
||||
|
||||
/** Show cursor */
|
||||
#define ANSIESC_DECTCEM_SET ( ( '?' << 8 ) | 'h' )
|
||||
|
||||
/** Hide cursor */
|
||||
#define ANSIESC_DECTCEM_RESET ( ( '?' << 8 ) | 'l' )
|
||||
|
||||
/** @} */
|
||||
|
||||
extern int ansiesc_process ( struct ansiesc_context *ctx, int c );
|
||||
|
|
Loading…
Reference in New Issue