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 
41 int cmdlineInit(int argc, char *argv[]);
42 
47 const char *cmdlineGetProgramName(void);
48 
60 const char *cmdlineGetValueForKey(const char key[]);
61 
71 bool cmdlineGetFlag(const char flag[]);
72 
74 unsigned int cmdlineGetExtraArgCount(void);
75 
82 const 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 * cmdlineGetExtraArg(unsigned int index)
Retrieves an extra argument.
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.
unsigned int cmdlineGetExtraArgCount(void)