From 5d3af71428194ebe68ef99e8b3e1c71409199789 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 2 Nov 2014 09:58:41 -0800 Subject: [PATCH] All data and dimensions parse successfully! --- dump.c | 63 +++++++++++++++++++++++++++++----------------------------- notes | 26 ++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 32 deletions(-) diff --git a/dump.c b/dump.c index dcf2f6dc92..d1de72327f 100644 --- a/dump.c +++ b/dump.c @@ -943,9 +943,17 @@ dump_data(void) char *base = get_string(); int x = get_u32(); printf ("\"%s\" with %d variables:\n", base, x); - if (match_u32(0)) + for (int i = 0; i < x; i++) { - for (int i = 0; i < x; i++) + int y = get_u32(); + if (!y) + y = 1; + else + match_u32_assert(0); + for (int j = 0; j <= 0; j++) + printf (" "); + printf("variable %d has %d values:\n", i, y); + for (int j = 0; j < y; j++) { if (match_byte(3)) { @@ -962,41 +970,32 @@ dump_data(void) match_byte(0); match_byte(0); } - else - dump_value (1); - putchar('\n'); - } - } - else - { - for (int i = 0; i < x; i++) - { - int y = get_u32(); - match_u32_assert(0); - for (int j = 0; j <= 0; j++) - printf (" "); - printf("variable %d has %d values:\n", i, y); - for (int j = 0; j < y; j++) + else if (match_byte (1)) { - if (match_byte(3)) + unsigned int format; + double value; + + if (match_byte (0x31)) { - char *a = get_string(); - match_byte_assert(0x58); - char *b = get_string(); - char *c = get_string(); - for (int k = 0; k <= 1; k++) - printf (" "); - printf ("\"%s\", \"%s\", \"%s\"", a, b, c); - match_byte(0); - match_byte(0); - match_byte(0); - match_byte(0); - match_byte(0); + if (match_u32 (1)) + { + printf("(footnote %d) ", get_u32()); + match_byte_assert (0); + match_byte_assert (0); + int subn = get_u32 (); + printf ("nested %d bytes", subn); + pos += subn; + } } else - dump_value (1); - putchar('\n'); + match_byte_assert (0x58); + format = get_u32 (); + value = get_double (); + printf ("value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff); } + else + dump_value (1); + putchar('\n'); } } } diff --git a/notes b/notes index f1ac136774..8818503f6f 100644 --- a/notes +++ b/notes @@ -1545,6 +1545,32 @@ web/f748b5e575e0a0c2e55698c3b18d272e/00000000094_lightTableData.bin (Model Descr i9 00 00 00 00 03 "All lags" 58 "no_help" "All lags" 01 +web/f748b5e575e0a0c2e55698c3b18d272e/00000000253_lightWarningData.bi (Warnings): + + i12 + + i0 i0 00 58 "There are fewer than two groups for dependent variable ^1 in split file [%1 = %2:, ^1 = ^2:]2. No statistics are computed." + i2 i0 05 58 "Tot_Part_V1" "Total particles" 02 + i2 i0 05 58 "Sitting" "Sitting" 02 + i0 02 58 F40.0(50) "Sitting" "" 02 + + i1 i0 00 58 "There are fewer than two groups for dependent variable ^1 in split file [%1 = %2:, ^1 = ^2:]2. No statistics are computed." + i2 i0 05 58 "Samp_timeV2" "Sampling time-v2" 02 + i2 i0 05 58 "Sitting" "Sitting" + i2 00 02 58 F40.0(50) "Sitting" i0 02 + + i2 i0 00 58 "There are fewer than two groups for dependent variable ^1 in split file [%1 = %2:, ^1 = ^2:]2. No statistics are computed." i2 00 00 00 00 05 58 + "Sampling_time_V1" + "Sampling time" 02 i2 00 00 00 00 05 58 + +smekens/default/00000000011_lightNotesData.bin (Notes): + + i15 i0 00 58 "^1 (^2K) bytes" i2 + i0 01 58 F40.0(40024) + i0 01 58 03 28 i40 00 00 00 8b 43 40 + + + Data: tdump21 (germano/Crosstabs.pdf) ------------- -- 2.30.2