mirror of
https://gitee.com/Lamdonn/varch.git
synced 2025-12-06 16:56:42 +08:00
1.2 KiB
1.2 KiB
Introduction
The console module plays a crucial role in program development and operation. It is mainly used to manage the input and output of character-based applications. Through the console module, developers can achieve effective interaction with users and customize and manage the command-line interface at the same time.
Interface
Functions
void console_init(void);
This is the initialization function of the console module. It can be called manually or through the export call of the init module (by default, it is called through export). It can be directly used after the program runs.
Usage Example:
>> cmd -h
Usage:
Enter the command line to execute the corresponding command
OPTIONS
[-l] : Print currently supported commands
[-n] : Print the number of currently supported commands
[-h] : Print help
[-v] : Print version
[-c] : Print the configuration information of the current command module
`argc` : The maximum number of parameters supported for parsing in the input command
`line` : The maximum length supported for parsing in the input command
`count` : The maximum command count supported
>>
>>
>> cmd -l
command list:
@ cmd
@ into
>>
>>