Files
src/miniquake/cmd.ml
- Package
miniquake.cmd- Reachable
- Yes
Imports
Declarations
# addAlias
function addAlias(system, name, value)
Add state for add alias.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `addAlias`. |
name | dynamic | — | Stable name that identifies the requested object or option. |
value | dynamic | — | Value consumed by `addAlias`. |
View source
# addCommand
function addCommand(system, name, callback)
Add state for add command.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `addCommand`. |
name | dynamic | — | Stable name that identifies the requested object or option. |
callback | dynamic | — | The callback input consumed by `addCommand`. |
View source
# addText
function addText(system, text)
Add state for add text.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `addText`. |
text | dynamic | — | Text to parse or process. |
View source
# argc
function argc(system)
Return the number of tokenized command arguments.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `argc`. |
View source
# argsFrom
function argsFrom(system, first)
Implements the `argsFrom` operation for `miniquake.cmd` (args from).
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `argsFrom`. |
first | dynamic | — | The first input consumed by `argsFrom`. |
View source
# argv
function argv(system, index)
Return one tokenized command argument by index.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `argv`. |
index | dynamic | — | Zero-based index of the requested entry. |
View source
# Cbuf_AddText
function Cbuf_AddText(system, text)
Mirror Quake's Cbuf_AddText routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cbuf_AddText`. |
text | dynamic | — | Text to parse or process. |
View source
# Cbuf_Execute
function Cbuf_Execute(system)
Mirror Quake's Cbuf_Execute routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cbuf_Execute`. |
View source
# Cbuf_Init
function Cbuf_Init()
Mirror Quake's Cbuf_Init routine and its observable state changes.
View source
# Cbuf_InsertText
function Cbuf_InsertText(system, text)
Mirror Quake's Cbuf_InsertText routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cbuf_InsertText`. |
text | dynamic | — | Text to parse or process. |
View source
# checkParm
function checkParm(system, name)
Validate parm and report any incompatibility.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `checkParm`. |
name | dynamic | — | Stable name that identifies the requested object or option. |
View source
# Cmd_AddCommand
function Cmd_AddCommand(system, name, callback, variableExists)
Mirror Quake's Cmd_AddCommand routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_AddCommand`. |
name | dynamic | — | Stable name that identifies the requested object or option. |
callback | dynamic | — | The callback input consumed by `Cmd_AddCommand`. |
variableExists | dynamic | — | The variable exists input consumed by `Cmd_AddCommand`. |
View source
# Cmd_Alias_f
function Cmd_Alias_f(system, arguments)
Mirror Quake's Cmd_Alias_f routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_Alias_f`. |
arguments | dynamic | — | Command-line arguments to inspect or execute. |
View source
# Cmd_Argc
function Cmd_Argc(system)
Mirror Quake's Cmd_Argc routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_Argc`. |
View source
# Cmd_Args
function Cmd_Args(system)
Mirror Quake's Cmd_Args routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_Args`. |
View source
# Cmd_Argv
function Cmd_Argv(system, index)
Mirror Quake's Cmd_Argv routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_Argv`. |
index | dynamic | — | Zero-based index of the requested entry. |
View source
# Cmd_CheckParm
function Cmd_CheckParm(system, name)
Mirror Quake's Cmd_CheckParm routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_CheckParm`. |
name | dynamic | — | Stable name that identifies the requested object or option. |
View source
# Cmd_CompleteCommand
function Cmd_CompleteCommand(system, partial)
Mirror Quake's Cmd_CompleteCommand routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_CompleteCommand`. |
partial | dynamic | — | The partial input consumed by `Cmd_CompleteCommand`. |
View source
# Cmd_Echo_f
function Cmd_Echo_f(arguments)
Mirror Quake's Cmd_Echo_f routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
arguments | dynamic | — | Command-line arguments to inspect or execute. |
View source
# Cmd_Exec_f
function Cmd_Exec_f(system, arguments, loadedText)
Mirror Quake's Cmd_Exec_f routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_Exec_f`. |
arguments | dynamic | — | Command-line arguments to inspect or execute. |
loadedText | dynamic | — | The loaded text input consumed by `Cmd_Exec_f`. |
View source
# Cmd_ExecuteString
function Cmd_ExecuteString(system, text, source)
Mirror Quake's Cmd_ExecuteString routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_ExecuteString`. |
text | dynamic | — | Text to parse or process. |
source | dynamic | — | Source value or collection to read. |
View source
# Cmd_Exists
function Cmd_Exists(system, name)
Report whether cmd exists holds for the active state.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_Exists`. |
name | dynamic | — | Stable name that identifies the requested object or option. |
View source
# Cmd_ForwardToServer
function Cmd_ForwardToServer(system, outgoing, connected, demoPlayback)
Mirror Quake's Cmd_ForwardToServer routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_ForwardToServer`. |
outgoing | dynamic | — | The outgoing input consumed by `Cmd_ForwardToServer`. |
connected | dynamic | — | The connected input consumed by `Cmd_ForwardToServer`. |
demoPlayback | dynamic | — | The demo playback input consumed by `Cmd_ForwardToServer`. |
View source
# Cmd_Init
function Cmd_Init(system)
Mirror Quake's Cmd_Init routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_Init`. |
View source
# Cmd_InitCallback
function Cmd_InitCallback(arguments)
Mirror Quake's Cmd_InitCallback routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
arguments | dynamic | — | Command-line arguments to inspect or execute. |
View source
# Cmd_StuffCmds_f
function Cmd_StuffCmds_f(system, commandLineArgs)
Mirror Quake's Cmd_StuffCmds_f routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_StuffCmds_f`. |
commandLineArgs | dynamic | — | The command line args input consumed by `Cmd_StuffCmds_f`. |
View source
# Cmd_TokenizeString
function Cmd_TokenizeString(system, text)
Mirror Quake's Cmd_TokenizeString routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_TokenizeString`. |
text | dynamic | — | Text to parse or process. |
View source
# Cmd_Wait_f
function Cmd_Wait_f(system)
Mirror Quake's Cmd_Wait_f routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `Cmd_Wait_f`. |
View source
# COMMAND_BUFFER_SIZE
const COMMAND_BUFFER_SIZE = 8192
Defines the command buffer size value used by `miniquake.cmd`.
View source
# commandExists
function commandExists(system, name)
Report whether command exists holds for the active state.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `commandExists`. |
name | dynamic | — | Stable name that identifies the requested object or option. |
View source
# completeCommand
function completeCommand(system, partial)
Handle command and update the associated state.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `completeCommand`. |
partial | dynamic | — | The partial input consumed by `completeCommand`. |
View source
# CopyString
function CopyString(value)
Transfer data for copy string.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed by `CopyString`. |
View source
# create
function create()
Implements the `create` operation for `miniquake.cmd` (create).
View source
# executeBuffer
function executeBuffer(system)
Execute buffer.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `executeBuffer`. |
View source
# executeString
function executeString(system, text)
Execute string.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `executeString`. |
text | dynamic | — | Text to parse or process. |
View source
# insertText
function insertText(system, text)
Add state for insert text.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `insertText`. |
text | dynamic | — | Text to parse or process. |
View source
# MAX_ALIAS_NAME
const MAX_ALIAS_NAME = 32
Defines the max alias name value used by `miniquake.cmd`.
View source
# MAX_ARGS
const MAX_ARGS = 80
Defines the max args value used by `miniquake.cmd`.
View source
# prefixMatches
function prefixMatches(candidate, partial)
Implements the `prefixMatches` operation for `miniquake.cmd` (prefix matches).
| Parameter | Type | Default | Description |
|---|
candidate | dynamic | — | The candidate input consumed by `prefixMatches`. |
partial | dynamic | — | The partial input consumed by `prefixMatches`. |
View source
# rawArgumentTail
function rawArgumentTail(text)
Implements the `rawArgumentTail` operation for `miniquake.cmd` (raw argument tail).
| Parameter | Type | Default | Description |
|---|
text | dynamic | — | Text to parse or process. |
View source
# removeCommandsNamed
function removeCommandsNamed(system, requestedName)
Remove every pending command with the requested name while preserving the order of unrelated buffered commands.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `removeCommandsNamed`. |
requestedName | dynamic | — | Name that identifies the requested value or resource. |
View source
# splitFirstCommand
function splitFirstCommand(text)
Convert first command into its canonical representation.
| Parameter | Type | Default | Description |
|---|
text | dynamic | — | Text to parse or process. |
View source
# terminatedAliasValue
function terminatedAliasValue(value)
Return terminated alias value derived from the active module state.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed by `terminatedAliasValue`. |
View source
# tokenize
function tokenize(text)
Convert the requested value into its canonical representation.
| Parameter | Type | Default | Description |
|---|
text | dynamic | — | Text to parse or process. |
View source