39 #if defined(_WIN32) || defined(__CYGWIN__)
40 #define CAG_EXPORT __declspec(dllexport)
41 #define CAG_IMPORT __declspec(dllimport)
43 #define CAG_EXPORT __attribute__((visibility("default")))
44 #define CAG_IMPORT __attribute__((visibility("default")))
50 #if defined(CAG_SHARED)
51 #if defined(CAG_EXPORTS)
52 #define CAG_PUBLIC CAG_EXPORT
54 #define CAG_PUBLIC CAG_IMPORT
97 #define CAG_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
CAG_PUBLIC char cag_option_get(const cag_option_context *context)
Gets the identifier of the option.
CAG_PUBLIC void cag_option_prepare(cag_option_context *context, const cag_option *options, size_t option_count, int argc, char **argv)
Prepare argument options context for parsing.
CAG_PUBLIC bool cag_option_fetch(cag_option_context *context)
Fetches an option from the argument list.
CAG_PUBLIC const char * cag_option_get_value(const cag_option_context *context)
Gets the value from the option.
struct cag_option_context cag_option_context
CAG_PUBLIC int cag_option_get_index(const cag_option_context *context)
Gets the current index of the context.
struct cag_option cag_option
CAG_PUBLIC void cag_option_print(const cag_option *options, size_t option_count, FILE *destination)
Prints all options to the terminal.
static struct cag_option options[]
const struct cag_option * options
const char * access_letters