projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
65f06dc4f56bdf3747c08f962d5f75c099cfb6ea
[libfirm]
/
obstack_printf.c
1
#include <stdarg.h>
2
#include <stdio.h>
3
#include "obstack.h"
4
5
#ifdef _WIN32
6
#define vsnprintf _vsnprintf
7
#endif
8
9
int obstack_printf(struct obstack *obst, const char *fmt, ...)
10
{
11
char buf[1024];
12
va_list ap;
13
int len;
14
15
va_start(ap, fmt);
16
len = vsnprintf(buf, sizeof(buf), fmt, ap);
17
obstack_grow(obst, buf, len);
18
va_end(ap);
19
20
return len;
21
}