Some access routines for visited flags in entity.h, irnode.h,
[libfirm] / ir / common / xoprintf.c
1 /* Xfprintf --- extended formatted output to obstacks.
2    Copyright (C) 1995, 1996 Christian von Roques */
3
4 /* $Id$ */
5
6 #ifdef HAVE_CONFIG_H
7 # include <config.h>
8 #endif
9
10 #ifndef USE_PRINTF
11
12 #include <obstack.h>
13 #include <string.h>
14 #include <assert.h>
15 #include "xprintf.h"
16
17
18 static int
19 xoprinter (void *obst, const char *data, size_t len)
20 {
21   obstack_grow ((struct obstack *)obst, data, len);
22   return len;
23 }
24
25
26 int
27 xoprintf (struct obstack *obst, const char *fmt, ...)
28 {
29   va_list args;
30   int res;
31
32   va_start (args, fmt);
33   res = xvgprintf (xoprinter, obst, fmt, args);
34   va_end (args);
35   return res;
36 }
37
38 int
39 xvoprintf (struct obstack *obst, const char *fmt, va_list args)
40 {
41   return xvgprintf (xoprinter, obst, fmt, args);
42 }
43
44 #endif /* USE_PRINTF */