static void declare_decl(struct output_state *dst, struct cdecl *decl)
{
- cdecl__emit_specs(dst, decl->specifiers, -1);
+ const char *sep;
+
+ sep = cdecl__emit_specs(dst, decl->specifiers, -1);
if (decl->declarators->type != CDECL_DECL_NULL)
- cdecl__emit(dst, " ");
+ cdecl__emit(dst, sep);
declare_declarator(dst, decl->declarators);
}
const char *s = a->vla[0] ? a->vla : "*";
cdecl__emit(dst, s);
} else {
- size_t rc = snprintf(dst->dst, dst->dstlen, "%.0" PRIuMAX, a->length);
- cdecl__advance(dst, rc);
+ cdecl__emit_uint(dst, a->length);
}
cdecl__emit(dst, "]");