Skip to content

File wsh_shell_esc.c

FileList > src > wsh_shell_esc.c

Go to the source code of this file

  • #include "wsh_shell_esc.h"

Public Static Attributes

Type Name
const WshShellEsc_Action_t WshShellEsc_SeqHandlers = /* multi line expression */

Public Functions

Type Name
void WshShellEsc_Handler (WshShellHistory_IO_t * pHistIO, WshShellIO_CommandLine_t * pCommandLine, WshShellEsc_Storage_t * pEscStorage, const WshShell_Char_t symbol)
Handles incoming escape sequence character.
WshShell_Bool_t WshShellEsc_IsSeqStarted (WshShellEsc_Storage_t * pEscStorage)
Checks if escape sequence is in progress.
void WshShellEsc_StartSeq (WshShellEsc_Storage_t * pEscStorage)
Starts a new escape sequence.

Public Static Functions

Type Name
void WshShellEsc_ArrowDown (WshShellHistory_IO_t * pHistIO, WshShellIO_CommandLine_t * pCommandLine)
void WshShellEsc_ArrowLeft (WshShellHistory_IO_t * pHistIO, WshShellIO_CommandLine_t * pCommandLine)
void WshShellEsc_ArrowRight (WshShellHistory_IO_t * pHistIO, WshShellIO_CommandLine_t * pCommandLine)
void WshShellEsc_ArrowUp (WshShellHistory_IO_t * pHistIO, WshShellIO_CommandLine_t * pCommandLine)
void WshShellEsc_ClearStorage (WshShellEsc_Storage_t * pEscStorage)

Public Static Attributes Documentation

variable WshShellEsc_SeqHandlers

const WshShellEsc_Action_t WshShellEsc_SeqHandlers[];

Public Functions Documentation

function WshShellEsc_Handler

Handles incoming escape sequence character.

1
2
3
4
5
6
void WshShellEsc_Handler (
    WshShellHistory_IO_t * pHistIO,
    WshShellIO_CommandLine_t * pCommandLine,
    WshShellEsc_Storage_t * pEscStorage,
    const WshShell_Char_t symbol
) 

Matches current buffer against known ANSI sequences and triggers appropriate handler.

Parameters:

  • pHistIO Pointer to shell history interface
  • pCommandLine Pointer to input interaction buffer
  • pEscStorage Pointer to escape sequence buffer
  • symbol Incoming character to append

function WshShellEsc_IsSeqStarted

Checks if escape sequence is in progress.

1
2
3
WshShell_Bool_t WshShellEsc_IsSeqStarted (
    WshShellEsc_Storage_t * pEscStorage
) 

Parameters:

  • pEscStorage Pointer to escape sequence buffer

Returns:

WshShell_Bool_t true if sequence has started


function WshShellEsc_StartSeq

Starts a new escape sequence.

1
2
3
void WshShellEsc_StartSeq (
    WshShellEsc_Storage_t * pEscStorage
) 

Initializes the escape buffer with ESC char.

Parameters:

  • pEscStorage Pointer to escape sequence buffer

Public Static Functions Documentation

function WshShellEsc_ArrowDown

1
2
3
4
static void WshShellEsc_ArrowDown (
    WshShellHistory_IO_t * pHistIO,
    WshShellIO_CommandLine_t * pCommandLine
) 

function WshShellEsc_ArrowLeft

1
2
3
4
static void WshShellEsc_ArrowLeft (
    WshShellHistory_IO_t * pHistIO,
    WshShellIO_CommandLine_t * pCommandLine
) 

function WshShellEsc_ArrowRight

1
2
3
4
static void WshShellEsc_ArrowRight (
    WshShellHistory_IO_t * pHistIO,
    WshShellIO_CommandLine_t * pCommandLine
) 

function WshShellEsc_ArrowUp

1
2
3
4
static void WshShellEsc_ArrowUp (
    WshShellHistory_IO_t * pHistIO,
    WshShellIO_CommandLine_t * pCommandLine
) 

function WshShellEsc_ClearStorage

1
2
3
static void WshShellEsc_ClearStorage (
    WshShellEsc_Storage_t * pEscStorage
) 


The documentation for this class was generated from the following file src/wsh_shell_esc.c