do {
lexer_next_preprocessing_token();
print_token(stdout, &lexer_token);
- puts("");
+ putchar('\n');
} while (lexer_token.type != T_EOF);
}
static void add_flag(struct obstack *obst, const char *format, ...)
{
- obstack_1grow(obst, ' ');
-#ifdef _WIN32
- obstack_1grow(obst, '"');
- obstack_vprintf(obst, format, ap);
- obstack_1grow(obst, '"');
-#else
char buf[4096];
va_list ap;
+
va_start(ap, format);
- vsnprintf(buf, sizeof(buf), format, ap);
+#ifdef _WIN32
+ int len =
+#endif
+ vsnprintf(buf, sizeof(buf), format, ap);
va_end(ap);
+ obstack_1grow(obst, ' ');
+#ifdef _WIN32
+ obstack_1grow(obst, '"');
+ obstack_grow(obst, buf, len);
+ obstack_1grow(obst, '"');
+#else
/* escape stuff... */
for (char *c = buf; *c != '\0'; ++c) {
switch(*c) {