diff --git a/include/gargoyle/codex.h b/include/gargoyle/codex.h index df459c4..cc3eba2 100644 --- a/include/gargoyle/codex.h +++ b/include/gargoyle/codex.h @@ -3,17 +3,21 @@ #include -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;