diff options
| author | [email protected] <[email protected]> | 2021-11-02 12:34:05 +0800 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2021-11-02 12:34:05 +0800 |
| commit | 31f55f0b88d4af34a8a36497f5e49c69b88b2fbf (patch) | |
| tree | 63515b3ceb361369cdc88ae6db1a808fc80e5b42 /include/MESA/sapp_cla.h | |
Diffstat (limited to 'include/MESA/sapp_cla.h')
| -rw-r--r-- | include/MESA/sapp_cla.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/MESA/sapp_cla.h b/include/MESA/sapp_cla.h new file mode 100644 index 0000000..fa4d0ad --- /dev/null +++ b/include/MESA/sapp_cla.h @@ -0,0 +1,42 @@ +#ifndef _SAPP_CLA_H_ +#define _SAPP_CLA_H_ 1 + +#include "sapp_std.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + For get command-line arguments(CLA). + + Note: + The string value 'opt_string_value' is read-only, + caller must not modify or free it after call sapp_get_cla_raw(). + + return value: + -1: not found opt_long_name; + 0: opt_long_name is set but no argument value. + 1: opt_long_name is set and has valid argument store in *opt_string_value. +*/ +int sapp_get_cla_raw(const char *opt_long_name, char ** const opt_string_value); + + +/* + For get command-line arguments(CLA). + + return value: + -1: not found opt_long_name; + 0: opt_long_name is set but no argument value. + 1: opt_long_name is set and has valid argument store in *opt_long_value. +*/ +int sapp_get_cla_long(const char *opt_long_name, long long *opt_long_value); + + +#ifdef __cplusplus +} +#endif + + +#endif + |
