style: 统一代码格式和命名规范
This commit is contained in:
@@ -7,14 +7,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define NORETURN __declspec(noreturn)
|
||||
#else
|
||||
#define NORETURN _Noreturn
|
||||
#endif
|
||||
|
||||
|
||||
#define ARG_DEFAULT_HELP_FLAG "--help"
|
||||
|
||||
typedef struct ArgParse ArgParse; // 解析器
|
||||
@@ -24,9 +22,9 @@ typedef int (*ArgParseCallback)(ArgParse *argParse,
|
||||
int val_len); // 回调函数
|
||||
|
||||
typedef enum {
|
||||
NOVALUE = 0, // 无值
|
||||
SINGLEVALUE, // 单值 例如: -i https://www.baidu.com
|
||||
MULTIVALUE, // 多值 例如: -s a b c 或 -s a -s b -s c等
|
||||
ArgParseNOVALUE = 0, // 无值
|
||||
ArgParseSINGLEVALUE, // 单值 例如: -i https://www.baidu.com
|
||||
ArgParseMULTIVALUE, // 多值 例如: -s a b c 或 -s a -s b -s c等
|
||||
} ArgParseValueType; // 值类型
|
||||
|
||||
typedef struct CommandArgs {
|
||||
|
||||
Reference in New Issue
Block a user