X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firprintf.h;h=a93c0bbb4f0e820be307f105c5df7b99e04ab65f;hb=637542932dc27dcdfc7def09b58d9d5d4c34fb77;hp=60464f13fd0ad064bbaadffc7ebbe54f39d5d39e;hpb=5d4a38a9efb9a6ed19e592fce8fcf73d1332d1b4;p=libfirm diff --git a/ir/ir/irprintf.h b/ir/ir/irprintf.h index 60464f13f..a93c0bbb4 100644 --- a/ir/ir/irprintf.h +++ b/ir/ir/irprintf.h @@ -20,9 +20,15 @@ #ifndef _IRPRINTF_H #define _IRPRINTF_H +#include "firm_config.h" + #include +#include #include +/* forward definition */ +struct obstack; + /** * Something that can append strings and chars to something. */ @@ -47,18 +53,20 @@ typedef void (ir_printf_cb_t)(const appender_t *app, void *object, size_t limit, * This function rudimentarily implements a kind of printf(3) for ir * nodes. Following conversion specifiers. No length, special or field * width specifiers are accepted. + * - @%> Print as many white spaces as given in the parameter. * - @%p A pointer. * - @%s A string. * - @%I An ident. + * - @%t A type name. * - @%e An entity name. - * - @%E An entity ld_name. + * - @%E An entity ld name. * - @%n A full description of a node. * - @%O The opcode name of an ir node. * - @%m The mode name of an ir mode. * - @%N The node number of an ir node. * - @%B The block node number of the nodes block. * - @%b A bitset. - * - @%t A tarval. + * - @%T A tarval. * * Each of these can be prepended by a '+' which means, that the given * pointer is a collection of items specified by the format. In this @@ -68,7 +76,7 @@ typedef void (ir_printf_cb_t)(const appender_t *app, void *object, size_t limit, * @code * pset *nodes; * ... - * ir_printf("Some nodes: %+n\n", it_pset, nodes); + * ir_printf("Some nodes: %*n\n", it_pset, nodes); * @endcode * The @c it_pset is an iterator interface (of type * @c iterator_t that allows the dumper to traverse the set. @@ -89,7 +97,7 @@ typedef void (ir_printf_cb_t)(const appender_t *app, void *object, size_t limit, * ... * pset *xyzs; * - * ir_printf("A set of xyz\'s: %+C\n", it_pset, xyzs, xyz_dump); + * ir_printf("A set of xyz\'s: %*C\n", it_pset, xyzs, xyz_dump); * @endcode * * @param fmt The format string. @@ -106,5 +114,28 @@ void ir_fprintf(FILE *f, const char *fmt, ...); */ void ir_snprintf(char *buf, size_t n, const char *fmt, ...); +/** + * @see irn_printf. + */ +void ir_vprintf(const char *fmt, va_list args); + +/** + * @see irn_printf. + */ +void ir_vfprintf(FILE *f, const char *fmt, va_list args); + +/** + * @see irn_printf. + */ +void ir_vsnprintf(char *buf, size_t len, const char *fmt, va_list args); + +/** + * @see irn_printf. + */ +void ir_obst_vprintf(struct obstack *obst, const char *fmt, va_list args); + +#ifdef WITH_LIBCORE +#include +#endif /* WITH_LIBCORE */ -#endif +#endif /* _IRPRINTF_H */