diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-15 15:51:40 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-15 15:51:40 +0200 |
| commit | b25a939e2d8b045c083caf3264c4e5aac1cf88fb (patch) | |
| tree | 37b862c82389ceddcf4624b5e26536390d6b8265 /tools/000_gendata | |
| parent | b02c083a3545b6e6b36ab62680128edec619a804 (diff) | |
| download | nissy-core-b25a939e2d8b045c083caf3264c4e5aac1cf88fb.tar.gz nissy-core-b25a939e2d8b045c083caf3264c4e5aac1cf88fb.zip | |
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.
Diffstat (limited to 'tools/000_gendata')
| -rw-r--r-- | tools/000_gendata/gendata.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) { | |||
| 17 | case -2: | 17 | case -2: |
| 18 | goto gendata_run_finish; | 18 | goto gendata_run_finish; |
| 19 | default: | 19 | default: |
| 20 | nissy_datainfo(size, buf, write_stdout); | 20 | nissy_datainfo(size, buf); |
| 21 | consistent = nissy_checkdata(size, buf) == 0; | 21 | consistent = nissy_checkdata(size, buf) == 0; |
| 22 | expected = check_distribution(solver, size, buf); | 22 | expected = check_distribution(solver, size, buf); |
| 23 | if (consistent && expected) { | 23 | if (consistent && expected) { |
| @@ -51,7 +51,7 @@ int main(int argc, char **argv) { | |||
| 51 | parse_h48_solver(solver, &h, &k); | 51 | parse_h48_solver(solver, &h, &k); |
| 52 | expected = expected_h48[h][k]; | 52 | expected = expected_h48[h][k]; |
| 53 | 53 | ||
| 54 | nissy_setlogger(log_stderr); | 54 | nissy_setlogger(log_stdout, NULL); |
| 55 | 55 | ||
| 56 | timerun(run); | 56 | timerun(run); |
| 57 | 57 | ||
