File wsh_shell_interact.c
FileList > src > wsh_shell_interact.c
Go to the source code of this file
#include "wsh_shell_interact.h"
Public Functions
| Type | Name |
|---|---|
| void | WshShellInteract_AppendLineBreak (WshShellIO_CommandLine_t * pCommandLine) Appends a CRLF ( \r\n ) sequence to the interaction buffer. |
| void | WshShellInteract_Attach (WshShell_Interact_t * pInteract, const WshShell_Char_t * pcName, WshShellInteractive_CmdHandler_t handler) Registers an interactive command. |
| void | WshShellInteract_Flush (WshShell_Interact_t * pInteract) Clears the contents of an interactive command slot. |
Public Functions Documentation
function WshShellInteract_AppendLineBreak
Appends a CRLF ( \r\n ) sequence to the interaction buffer.
Adds a carriage return and line feed to the end of the current input buffer, if there is enough space. This is typically used to terminate user input lines.
If the buffer is too full to append both characters, an error is printed.
Parameters:
pCommandLinePointer to the interaction buffer (command line).
function WshShellInteract_Attach
Registers an interactive command.
Attaches a named command and its execution function to the given interact structure. The command name is truncated if it exceeds the internal buffer size.
Parameters:
pInteractPointer to the interact object to initialize.pcNameNull-terminated name of the interactive command.handlerFunction pointer to be called when the command is executed.
function WshShellInteract_Flush
Clears the contents of an interactive command slot.
Resets the execution function pointer to NULL and clears the command name buffer. This effectively "removes" the interactive command from the shell registry.
Parameters:
pInteractPointer to the interact structure to flush.
The documentation for this class was generated from the following file src/wsh_shell_interact.c