parallax 1.0
command-line based task/todo manager
|
Contains functions for extracting content from the argument vector. More...
Go to the source code of this file.
Enumerations | |
enum | FLAG_TYPE { FLAG_CREATE , FLAG_MODIFY , FLAG_REMOVE , FLAG_LIST , FLAG_INVALID } |
Possible flag types. More... |
Functions | |
FLAG_TYPE | get_flag (char *flag_string) |
Assigns a string to its corresponding flag type. | |
const char * | get_content_arg (char *str_arg) |
Safely extracts any of the non-flag arguments in the argument vector. |
Contains functions for extracting content from the argument vector.
Manipulates the caller buffer to extract the content.
Definition in file argparse.h.
enum FLAG_TYPE |
Possible flag types.
Enumerator | |
---|---|
FLAG_CREATE | -c |
FLAG_MODIFY | -m |
FLAG_REMOVE | -r |
FLAG_LIST | -l |
FLAG_INVALID | invalid/malformed flag |
Definition at line 14 of file argparse.h.
const char * get_content_arg | ( | char * | str_arg | ) |
Safely extracts any of the non-flag arguments in the argument vector.
str_arg | Pointer to the argument string |
Definition at line 38 of file argparse.c.
FLAG_TYPE get_flag | ( | char * | flag_string | ) |
Assigns a string to its corresponding flag type.
Compares the argument with the possible flags.
flag_string | Pointer to the flag string in the argument vector |
Definition at line 9 of file argparse.c.