added new licence header
[libfirm] / ir / ir / irprintf.h
index d449631..1f4795c 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
 /*
  * Project:     libFIRM
  * File name:   ir/ir/irprintf.h
@@ -6,7 +25,6 @@
  * Created:     29.11.2004
  * CVS-ID:      $Id$
  * Copyright:   (c) 1998-2004 Universität Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
  */
 
 /**
@@ -16,9 +34,8 @@
  * @author Sebastian Hack
  * @date 29.11.2004
  */
-
-#ifndef _IRPRINTF_H
-#define _IRPRINTF_H
+#ifndef _FIRM_IR_IRPRINTF_H_
+#define _FIRM_IR_IRPRINTF_H_
 
 #include "firm_config.h"
 
@@ -50,25 +67,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.
+ * - @%% Print a '%' character.
  * - @%> Print as many white spaces as given in the parameter.
- * - @%p A pointer.
+ * - @%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
@@ -85,7 +113,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,
@@ -99,8 +127,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, ...);
 
@@ -135,17 +161,7 @@ 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);
 
 #ifdef WITH_LIBCORE
-/* use libcore */
-#define ir_printf       lc_printf
-#define ir_fprintf      lc_fprintf
-#define ir_snprintf     lc_snprintf
-#define ir_vprintf      lc_vprintf
-#define ir_vfprintf     lc_vfprintf
-#define ir_vsnprintf    lc_vsnprintf
-#define ir_obst_vprintf lc_voprintf
-
-#include <libcore/xprintf.h>
-
+#include <libcore/lc_printf.h>
 #endif /* WITH_LIBCORE */
 
-#endif /* _IRPRINTF_H */
+#endif /* _FIRM_IR_IRPRINTF_H_ */