X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Ftypes%2Fcpp_macro_decl.c;h=40e6c97efb7afb73389d325a5c318fdef26d7eb5;hb=698841dfdd4d70d24e0b7af25ac7100bc2cb26a4;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..40e6c97 100644 --- a/src/types/cpp_macro_decl.c +++ b/src/types/cpp_macro_decl.c @@ -23,7 +23,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ -#include "php_psi_stdinc.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#else +# include "php_config.h" +#endif #include "cpp.h" #include "data.h" @@ -58,24 +62,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 +90,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); } } }