From b25a939e2d8b045c083caf3264c4e5aac1cf88fb Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 15 Apr 2025 15:51:40 +0200 Subject: Better logging function Now it is possible to provide some data together with the logging function. This is useful for example in C++, where I can now provide an arbitrary callable object as data, and a simple wrapper function that call the callable object as logging function. --- tools/000_gendata/gendata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/000_gendata/gendata.c') diff --git a/tools/000_gendata/gendata.c b/tools/000_gendata/gendata.c index f2ac1a0..3123bf5 100644 --- a/tools/000_gendata/gendata.c +++ b/tools/000_gendata/gendata.c @@ -17,7 +17,7 @@ run(void) { case -2: goto gendata_run_finish; default: - nissy_datainfo(size, buf, write_stdout); + nissy_datainfo(size, buf); consistent = nissy_checkdata(size, buf) == 0; expected = check_distribution(solver, size, buf); if (consistent && expected) { @@ -51,7 +51,7 @@ int main(int argc, char **argv) { parse_h48_solver(solver, &h, &k); expected = expected_h48[h][k]; - nissy_setlogger(log_stderr); + nissy_setlogger(log_stdout, NULL); timerun(run); -- cgit v1.3