projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
- implemented i_mapper_bswap()
[libfirm]
/
ir
/
obstack_win
/
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
}