Removed bug in xgprintf.c
[libfirm] / ir / common / firm.c
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
3 **
4 ** Authors: Martin Trapp, Christian Schaefer
5 **
6 */
7
8 #ifdef HAVE_CONFIG_H
9 # include <config.h>
10 #endif
11
12 # include <stdio.h>
13 # include "ident_t.h"
14 # include "firm.h"
15 # include "mangle.h"
16 # include "xp_help.h"
17 # include "irnode_t.h"
18 # include "tv_t.h"
19 # include "tpop_t.h"
20
21 void
22 init_firm (void)
23 {
24   /* register the character 'I' as variable for ident outputs. */
25   xprintf_register ('I', ident_print);
26   /* register the character 'v' as variable for tarval outputs. */
27   xprintf_register ('v', tarval_print);
28   /* register the character 'R' as variable for ir node outputs. */
29   xprintf_register ('R', ir_node_print);
30
31   /* initialize all ident stuff */
32   id_init ();
33   /* create the type kinds. */
34   init_tpop ();
35   /* create an obstack and put all tarvals in a pdeq */
36   tarval_init_1 ();
37   /* initialize all modes an ir node can consist of */
38   init_mode ();
39   /* initialize tarvals, and floating point arithmetic */
40   tarval_init_2 ();
41   /* kind of obstack initialization */
42   init_mangle ();
43   /* initalize all op codes an irnode can consist of */
44   init_op ();
45   /* called once for each run of this library, empty at this moment!!! */
46   init_cons ();
47   /* Builds a construct allowing to access all information to be constructed
48      later. */
49   init_irprog ();
50 }