Implement debug_printf() in the Emscripten front end, since that's the

easiest way to call js_debug with formatted parameters.

[originally from svn r9807]
This commit is contained in:
Simon Tatham
2013-04-05 15:49:22 +00:00
parent e6afc02942
commit 33b3947d1f

10
emcc.c
View File

@ -138,6 +138,16 @@ void fatal(char *fmt, ...)
js_error_box(buf);
}
void debug_printf(char *fmt, ...)
{
char buf[512];
va_list ap;
va_start(ap, fmt);
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
js_debug(buf);
}
/*
* HTMLish names for the colours allocated by the puzzle.
*/