From e6ff0ce6926fa921a13055c9c35d8e60b691e776 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Wed, 11 Sep 2024 17:01:49 +0200 Subject: Finished table refactor --- tools/001_gendata_h48h0k4/gendata_h48h0k4.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'tools/001_gendata_h48h0k4') diff --git a/tools/001_gendata_h48h0k4/gendata_h48h0k4.c b/tools/001_gendata_h48h0k4/gendata_h48h0k4.c index 0e3deb1..a9993b8 100644 --- a/tools/001_gendata_h48h0k4/gendata_h48h0k4.c +++ b/tools/001_gendata_h48h0k4/gendata_h48h0k4.c @@ -27,8 +27,6 @@ uint32_t expected[21] = { char *buf; void run(void) { - uint32_t *h48info, x; - int i; int64_t s; s = nissy_gendata("h48", OPTIONS, buf); @@ -36,20 +34,12 @@ void run(void) { if (s == -1) { printf("Error generating table\n"); } else { - printf("Table is probably ok\n"); -/* -TODO: adapt to new tables - printf("Succesfully generated %" PRId64 " bytes. Table:\n", s); - h48info = (uint32_t *)buf + 1 + (ETABLESIZE(HVALUE) + COCSEPSIZE) / 4; - for (i = 0; i < MAXDEPTH+1 && h48info[i+1]; i++) { - x = h48info[i+1]; - printf("%d:\t%" PRIu32, i, x); - if (x != expected[i]) - printf(" <--- Error! Expected: %" PRIu32, - expected[i]); - printf("\n"); - } -*/ + nissy_datainfo(buf, write_stdout); + printf("\n"); + printf("Succesfully generated %" PRId64 " bytes. " + "See above for details on the tables.\n", s); + + /* TODO: check that the table is correct */ } } -- cgit v1.3