MiniQuake

src/miniquake/cmd.ml

Package
miniquake.cmd
Reachable
Yes

Imports

Declarations

addAlias

function addAlias(system, name, value)

Add state for add alias.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `addAlias`.
namedynamic—Stable name that identifies the requested object or option.
valuedynamic—Value consumed by `addAlias`.

View source

addCommand

function addCommand(system, name, callback)

Add state for add command.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `addCommand`.
namedynamic—Stable name that identifies the requested object or option.
callbackdynamic—The callback input consumed by `addCommand`.

View source

addText

function addText(system, text)

Add state for add text.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `addText`.
textdynamic—Text to parse or process.

View source

argc

function argc(system)

Return the number of tokenized command arguments.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `argc`.

View source

argsFrom

function argsFrom(system, first)

Implements the `argsFrom` operation for `miniquake.cmd` (args from).

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `argsFrom`.
firstdynamic—The first input consumed by `argsFrom`.

View source

argv

function argv(system, index)

Return one tokenized command argument by index.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `argv`.
indexdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cbuf_AddText`.
textdynamic—Text to parse or process.

View source

Cbuf_Execute

function Cbuf_Execute(system)

Mirror Quake's Cbuf_Execute routine and its observable state changes.

ParameterTypeDefaultDescription
systemdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cbuf_InsertText`.
textdynamic—Text to parse or process.

View source

checkParm

function checkParm(system, name)

Validate parm and report any incompatibility.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `checkParm`.
namedynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_AddCommand`.
namedynamic—Stable name that identifies the requested object or option.
callbackdynamic—The callback input consumed by `Cmd_AddCommand`.
variableExistsdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_Alias_f`.
argumentsdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_Argv`.
indexdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_CheckParm`.
namedynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_CompleteCommand`.
partialdynamic—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.

ParameterTypeDefaultDescription
argumentsdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_Exec_f`.
argumentsdynamic—Command-line arguments to inspect or execute.
loadedTextdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_ExecuteString`.
textdynamic—Text to parse or process.
sourcedynamic—Source value or collection to read.

View source

Cmd_Exists

function Cmd_Exists(system, name)

Report whether cmd exists holds for the active state.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_Exists`.
namedynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_ForwardToServer`.
outgoingdynamic—The outgoing input consumed by `Cmd_ForwardToServer`.
connecteddynamic—The connected input consumed by `Cmd_ForwardToServer`.
demoPlaybackdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—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.

ParameterTypeDefaultDescription
argumentsdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_StuffCmds_f`.
commandLineArgsdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `Cmd_TokenizeString`.
textdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `commandExists`.
namedynamic—Stable name that identifies the requested object or option.

View source

completeCommand

function completeCommand(system, partial)

Handle command and update the associated state.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `completeCommand`.
partialdynamic—The partial input consumed by `completeCommand`.

View source

CopyString

function CopyString(value)

Transfer data for copy string.

ParameterTypeDefaultDescription
valuedynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `executeBuffer`.

View source

executeString

function executeString(system, text)

Execute string.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `executeString`.
textdynamic—Text to parse or process.

View source

insertText

function insertText(system, text)

Add state for insert text.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `insertText`.
textdynamic—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).

ParameterTypeDefaultDescription
candidatedynamic—The candidate input consumed by `prefixMatches`.
partialdynamic—The partial input consumed by `prefixMatches`.

View source

rawArgumentTail

function rawArgumentTail(text)

Implements the `rawArgumentTail` operation for `miniquake.cmd` (raw argument tail).

ParameterTypeDefaultDescription
textdynamic—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.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `removeCommandsNamed`.
requestedNamedynamic—Name that identifies the requested value or resource.

View source

splitFirstCommand

function splitFirstCommand(text)

Convert first command into its canonical representation.

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.

View source

terminatedAliasValue

function terminatedAliasValue(value)

Return terminated alias value derived from the active module state.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `terminatedAliasValue`.

View source

tokenize

function tokenize(text)

Convert the requested value into its canonical representation.

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.

View source