$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
cli.h File Reference

Command-line interface and argument parsing. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  CliAction { CLI_ACTION_CONTINUE , CLI_ACTION_EXIT_SUCCESS , CLI_ACTION_EXIT_FAILURE }
 Directive for the application after parsing arguments. More...
 

Functions

CliAction cli_handle_args (int argc, char *argv[])
 Parses command-line arguments and determines the next action. More...
 

Detailed Description

Command-line interface and argument parsing.

Enumeration Type Documentation

◆ CliAction

enum CliAction

Directive for the application after parsing arguments.

Enumerator
CLI_ACTION_CONTINUE 

Arguments parsed, proceed to start application.

CLI_ACTION_EXIT_SUCCESS 

Help or version printed, exit normally.

CLI_ACTION_EXIT_FAILURE 

Invalid argument detected, exit with error.

Function Documentation

◆ cli_handle_args()

CliAction cli_handle_args ( int  argc,
char *  argv[] 
)

Parses command-line arguments and determines the next action.

Parameters
argcNumber of arguments.
argvArray of argument strings.
Returns
The directive for the main entry point.
See also
main.c
Here is the call graph for this function: