added QSE_CLI_DISCRETIONARY_OPTVAL.
renamed QSE_CLI_OPTVAL to QSE_CLI_REQUIRE_OPTVAL renamed QSE_CLI_OPTNAME to QSE_CLI_REQUIRE_OPTNAME
This commit is contained in:
@ -66,8 +66,13 @@ struct qse_opt_t
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
#define QSE_CLI_OPTNAME (1 << 0)
|
||||
#define QSE_CLI_OPTVAL (1 << 1)
|
||||
enum qse_cli_optflag_t
|
||||
{
|
||||
QSE_CLI_REQUIRE_OPTNAME = (1 << 0), /* if set, the option itself is require */
|
||||
QSE_CLI_REQUIRE_OPTVAL = (1 << 1), /* if set, the option's value is mandatory */
|
||||
QSE_CLI_DISCRETIONARY_OPTVAL = (1 << 2) /* if set, the option's value is optional. */
|
||||
};
|
||||
typedef enum qse_cli_optflag_t qse_cli_optflag_t;
|
||||
|
||||
enum qse_cli_error_code_t
|
||||
{
|
||||
@ -86,7 +91,7 @@ struct qse_cli_opt_t
|
||||
{
|
||||
/* input */
|
||||
const qse_char_t* name;
|
||||
int requires;
|
||||
int optflags; /* 0 or bitwise-ORed of qse_cli_optflags_t enumerartors */
|
||||
|
||||
/* output - you don't have to initialize this field */
|
||||
qse_char_t* value;
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
/* options */
|
||||
#define QSE_LOG_KEEP_FILE_OPEN (1 << 13)
|
||||
#define QSE_LOG_MASKED_PRIORITY (1 << 14)
|
||||
#define QSE_LOG_MASKED_PRIORITY (1 << 14)
|
||||
#define QSE_LOG_INCLUDE_PID (1 << 15)
|
||||
#define QSE_LOG_HOST_IN_REMOTE_SYSLOG (1 << 16)
|
||||
|
||||
|
Reference in New Issue
Block a user