X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flightning%2Flib%2Fjit_print.c;h=c44623a088a8de3a6c31b9c8dcaedaadc089c5f9;hb=aa314e8ebc2281c4b2d3db3378f143de5d68f335;hp=3d7c0ac6b5021faeffeb35cc8b7e12c99030a3f9;hpb=28d1bea2e828cd079593abc8c97ea6ff4fd7d4f4;p=pcsx_rearmed.git diff --git a/deps/lightning/lib/jit_print.c b/deps/lightning/lib/jit_print.c index 3d7c0ac6..c44623a0 100644 --- a/deps/lightning/lib/jit_print.c +++ b/deps/lightning/lib/jit_print.c @@ -20,12 +20,12 @@ #include #include -#define print_chr(value) fputc(value, stdout) -#define print_hex(value) fprintf(stdout, "0x%lx", value) -#define print_dec(value) fprintf(stdout, "%ld", value) -#define print_flt(value) fprintf(stdout, "%g", value) -#define print_str(value) fprintf(stdout, "%s", value) -#define print_ptr(value) fprintf(stdout, "%p", value) +#define print_chr(value) fputc(value, print_stream) +#define print_hex(value) fprintf(print_stream, "0x%lx", value) +#define print_dec(value) fprintf(print_stream, "%ld", value) +#define print_flt(value) fprintf(print_stream, "%g", value) +#define print_str(value) fprintf(print_stream, "%s", value) +#define print_ptr(value) fprintf(print_stream, "%p", value) #define print_reg(value) \ do { \ if ((value) & jit_regno_patch) \ @@ -45,6 +45,11 @@ * Initialization */ #include "jit_names.c" +/* + * Initialization + */ +static FILE *print_stream; + /* * Implementation @@ -54,6 +59,9 @@ _jit_print(jit_state_t *_jit) { jit_node_t *node; + if (!print_stream) + print_stream = stderr; + if ((node = _jitc->head)) { jit_print_node(node); for (node = node->next; node; node = node->next) {