Create proper types for all bit masks

This commit is contained in:
Nick Chambers 2022-06-29 14:32:14 -05:00
parent 36adca4362
commit 856442c97d
1 changed files with 14 additions and 10 deletions

View File

@ -3,17 +3,21 @@
#include <stdint.h>
static const uint8_t GARGOYLE_TYPE_BOOL = 1 << 0;
static const uint8_t GARGOYLE_TYPE_UINT = 1 << 1;
static const uint8_t GARGOYLE_TYPE_DBLE = 1 << 2;
static const uint8_t GARGOYLE_TYPE_ROPE = 1 << 3;
typedef uint8_t gargoyle_opt_type;
static const uint8_t GARGOYLE_ERR_SUCCESS = 0;
static const uint8_t GARGOYLE_ERR_UNKNOWN_OPT = 1;
static const uint8_t GARGOYLE_ERR_VALUE_REQUIRED = 2;
static const uint8_t GARGOYLE_ERR_INVALID_UINT = 3;
static const uint8_t GARGOYLE_ERR_INVALID_DBLE = 4;
static const uint8_t GARGOYLE_ERR_UNKNOWN_TYPE = 5;
static const gargoyle_opt_type GARGOYLE_TYPE_BOOL = 1 << 0;
static const gargoyle_opt_type GARGOYLE_TYPE_UINT = 1 << 1;
static const gargoyle_opt_type GARGOYLE_TYPE_DBLE = 1 << 2;
static const gargoyle_opt_type GARGOYLE_TYPE_ROPE = 1 << 3;
typedef uint8_t gargoyle_err_type;
static const gargoyle_err_type GARGOYLE_ERR_SUCCESS = 1 << 0;
static const gargoyle_err_type GARGOYLE_ERR_UNKNOWN_OPT = 1 << 1;
static const gargoyle_err_type GARGOYLE_ERR_VALUE_REQUIRED = 1 << 2;
static const gargoyle_err_type GARGOYLE_ERR_INVALID_UINT = 1 << 3;
static const gargoyle_err_type GARGOYLE_ERR_INVALID_DBLE = 1 << 4;
static const gargoyle_err_type GARGOYLE_ERR_UNKNOWN_TYPE = 1 << 5;
typedef uint8_t gargoyle_flag_type;