Fix the location of the option types
This commit is contained in:
parent
f6fba0ac6b
commit
f019f09a22
3 changed files with 10 additions and 9 deletions
|
@ -3,7 +3,13 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
const uint8_t GARGOYLE_ERR_SUCCESS = 0;
|
||||
const uint8_t GARGOYLE_ERR_UNKNOWN_OPT = 1;
|
||||
static const uint8_t GARGOYLE_TYPE_UINT = 1 << 0;
|
||||
static const uint8_t GARGOYLE_TYPE_BOOL = 1 << 1;
|
||||
static const uint8_t GARGOYLE_TYPE_FILE = 1 << 2;
|
||||
static const uint8_t GARGOYLE_TYPE_ROPE = 1 << 3;
|
||||
static const uint8_t GARGOYLE_TYPE_DBLE = 1 << 4;
|
||||
|
||||
static const uint8_t GARGOYLE_ERR_SUCCESS = 0;
|
||||
static const uint8_t GARGOYLE_ERR_UNKNOWN_OPT = 1;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3,12 +3,6 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t GARGOYLE_TYPE_UINT = 1 << 0;
|
||||
static const uint8_t GARGOYLE_TYPE_BOOL = 1 << 1;
|
||||
static const uint8_t GARGOYLE_TYPE_FILE = 1 << 2;
|
||||
static const uint8_t GARGOYLE_TYPE_ROPE = 1 << 3;
|
||||
static const uint8_t GARGOYLE_TYPE_DBLE = 1 << 4;
|
||||
|
||||
struct gargoyle_opt {
|
||||
const char *brand;
|
||||
uint16_t brand_sz;
|
||||
|
@ -19,7 +13,7 @@ struct gargoyle_opt {
|
|||
};
|
||||
|
||||
#define GARGOYLE_MK_OPT(brand) brand, (sizeof(brand) - 1)
|
||||
#define GARGOYLE_EZ_OPT(brand, val) brand, (sizeof(brand) - 1), 0[brand] /* >:) */, &val, sizeof(val)
|
||||
#define GARGOYLE_EZ_OPT(brand, val) brand, (sizeof(brand) - 1), 0[brand], &val, sizeof(val)
|
||||
|
||||
struct gargoyle_opt *gargoyle_find_brand(uint16_t optc, struct gargoyle_opt *optv, const char *brand);
|
||||
struct gargoyle_opt *gargoyle_find_emblem(uint16_t optc, struct gargoyle_opt *optv, const char emblem);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <gargoyle/codex.h>
|
||||
#include <gargoyle/sleuth.h>
|
||||
#include <gargoyle/twine.h>
|
||||
#include <stddef.h>
|
||||
|
|
Loading…
Reference in a new issue