instrument: Remove stale start loop test.
[libfirm] / ir / ir / irprintf.c
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   A little printf helper unterstanding firm types
23  * @author  Sebastian Hack
24  * @date    29.11.2004
25  */
26 #include "config.h"
27
28 #include <string.h>
29
30 #include <stdlib.h>
31 #include <stdio.h>
32 #include <stdarg.h>
33
34 #include <ctype.h>
35
36 #include "ident.h"
37 #include "irmode_t.h"
38 #include "irnode_t.h"
39 #include "entity_t.h"
40 #include "type_t.h"
41 #include "tv_t.h"
42 #include "irprintf.h"
43 #include "obst.h"
44 #include "pset.h"
45 #include "bitset.h"
46 #include "dbginfo_t.h"
47 #include "irargs_t.h"
48
49 void ir_printf(const char *fmt, ...)
50 {
51         va_list args;
52
53         va_start(args, fmt);
54         lc_evprintf(firm_get_arg_env(), fmt, args);
55         va_end(args);
56 }
57
58 void ir_fprintf(FILE *f, const char *fmt, ...)
59 {
60         va_list args;
61
62         va_start(args, fmt);
63         lc_evfprintf(firm_get_arg_env(), f, fmt, args);
64         va_end(args);
65 }
66
67 void ir_snprintf(char *buf, size_t n, const char *fmt, ...)
68 {
69         va_list args;
70
71         va_start(args, fmt);
72         lc_evsnprintf(firm_get_arg_env(), buf, n, fmt, args);
73         va_end(args);
74 }
75
76 void ir_vprintf(const char *fmt, va_list args)
77 {
78         lc_evprintf(firm_get_arg_env(), fmt, args);
79 }
80
81 void ir_vfprintf(FILE *f, const char *fmt, va_list args)
82 {
83         lc_evfprintf(firm_get_arg_env(), f, fmt, args);
84 }
85
86 void ir_vsnprintf(char *buf, size_t len, const char *fmt, va_list args)
87 {
88         lc_evsnprintf(firm_get_arg_env(), buf, len, fmt, args);
89 }
90
91 void ir_obst_vprintf(struct obstack *obst, const char *fmt, va_list args)
92 {
93         lc_evoprintf(firm_get_arg_env(), obst, fmt, args);
94 }