X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Ftypes%2Fcpp_macro_decl.c;h=25bafd848ecb3c11aa4f106b9e4501ee3029911e;hb=12964ebafbb9090db90faa09fba4140bdffff0eb;hp=4f21d60848e97c854e9dfb60f06db9a87f7820ce;hpb=216e7ac3b97aed5a5d65c511dc061c78be90e79d;p=m6w6%2Fext-psi diff --git a/src/types/cpp_macro_decl.c b/src/types/cpp_macro_decl.c index 4f21d60..25bafd8 100644 --- a/src/types/cpp_macro_decl.c +++ b/src/types/cpp_macro_decl.c @@ -58,24 +58,24 @@ void psi_cpp_macro_decl_free(struct psi_cpp_macro_decl **macro_ptr) } } -void psi_cpp_macro_decl_dump(int fd, struct psi_cpp_macro_decl *macro) +void psi_cpp_macro_decl_dump(struct psi_dump *dump, struct psi_cpp_macro_decl *macro) { - dprintf(fd, "%s", macro->token->text->val); + PSI_DUMP(dump, "%s", macro->token->text->val); if (macro->sig) { size_t i = 0; struct psi_token *tok; - dprintf(fd, "("); + PSI_DUMP(dump, "("); while (psi_plist_get(macro->sig, i++, &tok)) { - dprintf(fd, "%s%s", i>1?",":"", tok->text->val); + PSI_DUMP(dump, "%s%s", i>1?",":"", tok->text->val); } - dprintf(fd, ")"); + PSI_DUMP(dump, ")"); } if (macro->exp) { - dprintf(fd, " "); - psi_num_exp_dump(fd, macro->exp); + PSI_DUMP(dump, " "); + psi_num_exp_dump(dump, macro->exp); assert(macro->tokens); @@ -86,13 +86,13 @@ void psi_cpp_macro_decl_dump(int fd, struct psi_cpp_macro_decl *macro) while (psi_plist_get(macro->tokens, i++, &tok)) { switch (tok->type) { case PSI_T_QUOTED_STRING: - dprintf(fd, " \"%s\"", tok->text->val); + PSI_DUMP(dump, " \"%s\"", tok->text->val); break; case PSI_T_QUOTED_CHAR: - dprintf(fd, " '%s'", tok->text->val); + PSI_DUMP(dump, " '%s'", tok->text->val); break; default: - dprintf(fd, " %s", tok->text->val); + PSI_DUMP(dump, " %s", tok->text->val); } } }