X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/6d601969de9687819347cf27df8ddf6ab026e4b0..8b40c60072c0549d18afb1e19fa28ee18036957c:/src/output.c diff --git a/src/output.c b/src/output.c index 22fc2e9..f691765 100644 --- a/src/output.c +++ b/src/output.c @@ -47,18 +47,11 @@ size_t cdecl__advance(char **buf, size_t *n, size_t amount) return ret + cdecl__advance_(buf, n, rc); } -static const char *explain_spec_simple(struct cdecl_declspec *s) -{ - switch (s->type) { -# include "namespecs.h" - } - - assert(0); -} +#include "specstr.h" static size_t explain_spec(char *buf, size_t n, struct cdecl_declspec *s) { - const char *keyword = explain_spec_simple(s); + const char *keyword = spec_string(s->type); if (keyword[0] && s->ident) return snprintf(buf, n, "%s %s", keyword, s->ident);