X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/0aa997a6eaad4cd730ddde283e8b156642510f32..98600e8bed3760e4bc82694a38422936b003419f:/src/cdecl.h diff --git a/src/cdecl.h b/src/cdecl.h index 695024f..0846cfd 100644 --- a/src/cdecl.h +++ b/src/cdecl.h @@ -102,12 +102,12 @@ void cdecl_free(struct cdecl *decl); size_t cdecl_explain(char *buf, size_t n, struct cdecl *decl); size_t cdecl_declare(char *buf, size_t n, struct cdecl *decl); -static inline int cdecl_spec_kind(struct cdecl_declspec *spec) +static inline int cdecl_spec_kind(const struct cdecl_declspec *spec) { return spec->type & ~(CDECL_SPEC_TYPE-1u); } -static inline _Bool cdecl_is_abstract(struct cdecl_declarator *d) +static inline _Bool cdecl_is_abstract(const struct cdecl_declarator *d) { while (d->child) d = d->child; @@ -117,8 +117,18 @@ static inline _Bool cdecl_is_abstract(struct cdecl_declarator *d) /* Error handling. */ enum { - CDECL_ENOMEM, + CDECL_ENOMEM = 1, CDECL_ENOPARSE, + CDECL_EBADARRAY, + CDECL_EBADDECL, + CDECL_EBADPARAMS, + CDECL_EBADPOINTER, + CDECL_EBADQUAL, + CDECL_EBADRETURN, + CDECL_EBADSTOR, + CDECL_EBADTYPE, + CDECL_ENOTFUNC, + CDECL_EVOIDPARAM }; struct cdecl_error {