sister
cmdline.h
Go to the documentation of this file.
1
23#ifndef CMDLINE_H
24#define CMDLINE_H
25
26
27#include <stdbool.h>
28
29
41int cmdlineInit(int argc, char *argv[]);
42
47const char *cmdlineGetProgramName(void);
48
60const char *cmdlineGetValueForKey(const char key[]);
61
71bool cmdlineGetFlag(const char flag[]);
72
74unsigned int cmdlineGetExtraArgCount(void);
75
82const char *cmdlineGetExtraArg(unsigned int index);
83
84
85#endif /* CMDLINE_H */
bool cmdlineGetFlag(const char flag[])
Checks if a given flag ("-flag" or "--flag") was passed via the command line.
const char * cmdlineGetProgramName(void)
Retrieves the program name.
const char * cmdlineGetValueForKey(const char key[])
Gets the corresponding value for a given option key ("-key=value" or "--key=value").
int cmdlineInit(int argc, char *argv[])
Initializes the command-line parsing module.
const char * cmdlineGetExtraArg(unsigned int index)
Retrieves an extra argument.
unsigned int cmdlineGetExtraArgCount(void)