X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firprintf.h;h=22934dd537f2cd9733a3c85691d5cc2fac63ee05;hb=169fd803ea2ed08171113c1fd7ab4e528e1ebc26;hp=20280a2ed3fa7da68ebdc55b987c10c2503dcd4b;hpb=3197973335859d2a385f0b1a4c431b7baa5b201e;p=libfirm diff --git a/ir/ir/irprintf.h b/ir/ir/irprintf.h index 20280a2ed..22934dd53 100644 --- a/ir/ir/irprintf.h +++ b/ir/ir/irprintf.h @@ -20,10 +20,14 @@ #ifndef _IRPRINTF_H #define _IRPRINTF_H +#include "firm_config.h" + #include #include #include -#include + +/* forward definition */ +struct obstack; /** * Something that can append strings and chars to something. @@ -46,24 +50,36 @@ typedef void (ir_printf_cb_t)(const appender_t *app, void *object, size_t limit, /** * A string formatting routine for ir objects. - * This function rudimentarily implements a kind of printf(3) for ir + * + * @param fmt The format string. + * + * This function rudimentary implements a kind of printf(3) for ir * nodes. Following conversion specifiers. No length, special or field * width specifiers are accepted. - * - @%p A pointer. + * - @%% Print a '%' character. + * - @%> Print as many white spaces as given in the parameter. + * - @%c Print a character * - @%s A string. + * - @%p A pointer. + * - @%d A decimal integer. + * - @%x A hexadecimal integer. + * - @%o An octal integer. * - @%I An ident. * - @%t A type name. * - @%e An entity name. * - @%E An entity ld name. + * - @%T A tarval. * - @%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. + * - @%m The mode name of an ir mode. * - @%B The block node number of the nodes block. * - @%b A bitset. - * - @%T A tarval. + * - @%= A pnc value + * - @%G A debug info (if available) + * - @%P A compound graph path * - * Each of these can be prepended by a '+' which means, that the given + * Each of these can be prepend by a '+' which means, that the given * pointer is a collection of items specified by the format. In this * case you also have to pass an iterator interface to ir_printf() * suitable for the instance of the collection. So, imagine you have a @@ -80,7 +96,7 @@ typedef void (ir_printf_cb_t)(const appender_t *app, void *object, size_t limit, * callback function which will be invoked on each element in the * collection. It gets the appender (the thing where the textual * representation of the element is written to) and its parameters - * passed by the dumping function. Suppose you have your own datatype + * passed by the dumping function. Suppose you have your own data type * @c xyz_t and want to dump a pset of it, you have: * @code * void xyz_dump(const appender_t *app, void *object, size_t limit, @@ -94,8 +110,6 @@ typedef void (ir_printf_cb_t)(const appender_t *app, void *object, size_t limit, * * ir_printf("A set of xyz\'s: %*C\n", it_pset, xyzs, xyz_dump); * @endcode - * - * @param fmt The format string. */ void ir_printf(const char *fmt, ...); @@ -129,4 +143,8 @@ void ir_vsnprintf(char *buf, size_t len, const char *fmt, va_list args); */ void ir_obst_vprintf(struct obstack *obst, const char *fmt, va_list args); -#endif +#ifdef WITH_LIBCORE +#include +#endif /* WITH_LIBCORE */ + +#endif /* _IRPRINTF_H */