*
*/
-#include <stdbool.h>
+#include <stdarg.h>
#include "qemu-common.h"
#include "qstring.h"
/**
* Error handler
*/
-static void parse_error(JSONParserContext *ctxt, QObject *token, const char *msg, ...)
+static void GCC_FMT_ATTR(3, 4) parse_error(JSONParserContext *ctxt,
+ QObject *token, const char *msg, ...)
{
- fprintf(stderr, "parse error: %s\n", msg);
+ va_list ap;
+ va_start(ap, msg);
+ fprintf(stderr, "parse error: ");
+ vfprintf(stderr, msg, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
}
/**
qstring_append(str, "\b");
ptr++;
break;
+ case 'f':
+ qstring_append(str, "\f");
+ ptr++;
+ break;
case 'n':
qstring_append(str, "\n");
ptr++;