diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-08-30 07:52:04 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-08-30 07:52:04 +0200 |
| commit | a7444e9ab414e1eb73451a806289a3f7c4f02047 (patch) | |
| tree | 02219807113dde108e278f38f3dd5874f7e3dc18 /tools/001_gendata_h48h0k4 | |
| parent | 1983bacfbb84e2a410ebe663ac1fa7c1b22eb096 (diff) | |
| parent | c548499e68e473452592c9b0bf860f76bd8b94b8 (diff) | |
| download | nissy-core-a7444e9ab414e1eb73451a806289a3f7c4f02047.tar.gz nissy-core-a7444e9ab414e1eb73451a806289a3f7c4f02047.zip | |
Merge branch 'master' of tronto.net:h48
Diffstat (limited to 'tools/001_gendata_h48h0k4')
| -rw-r--r-- | tools/001_gendata_h48h0k4/gendata_h48h0k4.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/001_gendata_h48h0k4/gendata_h48h0k4.c b/tools/001_gendata_h48h0k4/gendata_h48h0k4.c index a73f818..a2c57ca 100644 --- a/tools/001_gendata_h48h0k4/gendata_h48h0k4.c +++ b/tools/001_gendata_h48h0k4/gendata_h48h0k4.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #include "../timerun.h" | 1 | #include "../tool.h" |
| 2 | #include "../../src/nissy.h" | ||
| 3 | 2 | ||
| 4 | #define MAXDEPTH 20 | 3 | #define MAXDEPTH 20 |
| 5 | #define HVALUE 0 | 4 | #define HVALUE 0 |
| @@ -38,12 +37,12 @@ void run(void) { | |||
| 38 | printf("Error generating table\n"); | 37 | printf("Error generating table\n"); |
| 39 | } else { | 38 | } else { |
| 40 | printf("Succesfully generated %" PRId64 " bytes. Table:\n", s); | 39 | printf("Succesfully generated %" PRId64 " bytes. Table:\n", s); |
| 41 | h48info = (uint32_t *)buf + (ETABLESIZE(HVALUE) + COCSEPSIZE) / 4; | 40 | h48info = (uint32_t *)buf + 1 + (ETABLESIZE(HVALUE) + COCSEPSIZE) / 4; |
| 42 | for (i = 0; i < MAXDEPTH+1 && h48info[i+1]; i++) { | 41 | for (i = 0; i < MAXDEPTH+1 && h48info[i+1]; i++) { |
| 43 | x = h48info[i+1]; | 42 | x = h48info[i+1]; |
| 44 | printf("%d:\t%" PRIu32, i, x); | 43 | printf("%d:\t%" PRIu32, i, x); |
| 45 | if (x != expected[i]) | 44 | if (x != expected[i]) |
| 46 | printf(" <--- Error! Expected: %" PRIu32 "\n", | 45 | printf(" <--- Error! Expected: %" PRIu32, |
| 47 | expected[i]); | 46 | expected[i]); |
| 48 | printf("\n"); | 47 | printf("\n"); |
| 49 | } | 48 | } |
