diff --git a/src/core/stuff.c b/src/core/stuff.c index 1f86ed94..fa8fc6a0 100644 --- a/src/core/stuff.c +++ b/src/core/stuff.c @@ -348,6 +348,14 @@ NOINLINE B make_fmt(char* p, ...) { va_end(a); return r; } +NOINLINE void fprint_fmt(FILE* f, char* p, ...) { + va_list a; + va_start(a, p); + B r = do_fmt(emptyCVec(), p, a); + va_end(a); + fprintRaw(f, r); + decG(r); +} NOINLINE void print_fmt(char* p, ...) { va_list a; va_start(a, p); @@ -831,7 +839,7 @@ void g_pst(void) { vm_pstLive(); fflush(stdout); fflush(stderr); } #endif #if WARN_SLOW==1 static void warn_ln(B x) { - if (isArr(x)) print_fmt("%s items, %S, shape=%H\n", IA(x), eltype_repr(TI(x,elType)), x); + if (isArr(x)) fprint_fmt(stderr, "%s items, %S, shape=%H\n", IA(x), eltype_repr(TI(x,elType)), x); else { fprintf(stderr, "atom: "); fprintRaw(stderr, x = bqn_fmt(inc(x))); dec(x); diff --git a/src/core/stuff.h b/src/core/stuff.h index d17685df..c487e920 100644 --- a/src/core/stuff.h +++ b/src/core/stuff.h @@ -156,6 +156,7 @@ i32 num_fmt(char buf[30], f64 x); B append_fmt(B s, char* p, ...); B make_fmt(char* p, ...); void print_fmt(char* p, ...); +void fprint_fmt(FILE* f, char* p, ...); #define AJOIN(X) s = vec_join(s,X) // consumes X #define AOBJ(X) s = vec_addN(s,X) // consumes X #define ACHR(X) AOBJ(m_c32(X)) diff --git a/test/moreCfgs.sh b/test/moreCfgs.sh index 31fad873..72548a23 100755 --- a/test/moreCfgs.sh +++ b/test/moreCfgs.sh @@ -9,6 +9,7 @@ make heapverify && ./BQN -p 2+2 || exit make rtverify && ./BQN -p 2+2 || exit make rtperf && ./BQN -p 2+2 | head -2 || exit make f='-DDEBUG -DDEBUG_VM' c && ./BQN -p 2+2 | tail -2 || exit +make f='-DWARN_SLOW' c && ./BQN -p 2+2 2> /dev/null || exit make f='-DMM=0 -DENABLE_GC=0' c && ./BQN -p 2+2 || exit make f='-DMM=1' c && ./BQN -p 2+2 || exit make f='-DMM=2' c && ./BQN -p 2+2 || exit @@ -27,7 +28,6 @@ make f='-DLOG_GC' c && ./BQN -p 2+2 || exit make f='-DWRITE_ASM' c && ./BQN -p 2+2 || exit make f='-DUSE_PERF' c && ./BQN -p 2+2 || exit make f='-DUSZ_64' c && ./BQN -p 2+2 || exit -make f='-DWARN_SLOW' c && ./BQN -p 2+2 || exit make f='-DREPL_INTERRUPT=0' c && ./BQN -p 2+2 || exit make f='-DREPL_INTERRUPT=1' c && ./BQN -p 2+2 || exit make FFI=0 c && ./BQN -p 2+2 || exit