From be65e31f0086c5dc5f833ac03a8bf4c8cae7b1a2 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 2 Nov 2014 09:01:44 -0800 Subject: [PATCH] Fix some more. --- dump.c | 111 +++++++++++++++++++++++++++++++++++++++++---------------- notes | 33 ++++++++++------- 2 files changed, 100 insertions(+), 44 deletions(-) diff --git a/dump.c b/dump.c index 49f4a888b8..1608b37346 100644 --- a/dump.c +++ b/dump.c @@ -847,44 +847,93 @@ dump_data(void) char *base = get_string(); int x = get_u32(); printf ("\"%s\"; %d variables:\n", base, x); - if (match_u32(0)) - { - for (int i = 0; i < x; i++) - { - dump_value (0); - putchar('\n'); - } - } - else + 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++) { - 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++) + 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 (0)) + { + if (match_u32 (1)) + get_string(); + else + match_u32_assert (0); + int subn = get_u32 (); + printf ("nested %d bytes", subn); + pos += subn; + } + else 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 + { + match_u32_assert(2); + printf("(special 2)"); + match_byte_assert(0); + match_byte_assert(0); + match_u32_assert(1); + match_byte_assert(0); + match_byte_assert(0); + int subn = get_u32 (); + printf ("nested %d bytes", subn); + pos += subn; + } } else - dump_value (0); - 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 if (match_byte(3)) + { + 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); + } + else if (match_byte(5)) + { + match_byte_assert (0x58); + printf ("variable \"%s\"", get_string()); + get_string(); + if (!match_byte(1) && !match_byte(2)) + match_byte_assert(3); + match_byte (0); + match_byte (0); + match_byte (0); + match_byte (0); } + else + dump_value (0); + putchar('\n'); } } } diff --git a/notes b/notes index 902b7d49a0..754a45cbbb 100644 --- a/notes +++ b/notes @@ -1503,25 +1503,32 @@ web/1fe57275203d4c8b7eca5bd796738e71/00000000014_lightTableData.bin (Correlation web/f748b5e575e0a0c2e55698c3b18d272e/00000000075_lightTableData.bin (Case Processing Summary): -i5 -i0 i0 01 58 F40.0(46) -i1 i0 01 58 F40.0(0) -i2 i0 01 31 i2 00 00 i1 00 00 i6 00 00 00 00 58 58 F40.0(62) -i3 i0 01 58 F40.0(15) -i4 i0 01 58 F40.0(15) + i5 + i0 i0 01 58 F40.0(46) + i1 i0 01 58 F40.0(0) + i2 i0 01 31 i2 00 00 i1 00 00 i6 00 00 00 00 58 58 F40.0(62) + i3 i0 01 58 F40.0(15) + i4 i0 01 58 F40.0(15) web/76e9b53e9f775fb690a88919ccdbb03c/00000000743_lightWarningData.bin (Warnings): -i1 - -i0 i0 00 31 i0 i0 i72: (i66: ("" 31 "Fewer than two groups for depvar ^1 in split [:^1=^2,:]2.") 58 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 "soi_tot" 00 00 00 00 02 i2 00 00 00 00 05 58 "erotica_virgin" -00 00 00 00 i2 00 02 58 F40.1(1.0) + i0 i0 31 i0 i0 i72: (i66: ("" 31 "Fewer than two groups for depvar ^1 in split [:^1=^2,:]2.") 58 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 "soi_tot" 00 00 00 00 02 + i2 i0 + 05 58 "erotica_virgin" 00 00 00 00 i2 00 + 02 58 F40.1(1.0) -"erotica_virgin" -"EROTICA VIRGIN" 02 + "erotica_virgin" + "EROTICA VIRGIN" 02 +web/c6b0660f7afccdb067f766a44ded21ab/00000000031_lightNotesData.bin (Notes): + i13 i0 01 58 DTIME13.2(0.156) + i14 i0 01 58 DTIME13.2(0.14) + i15 i0 00 31 i0 i0 i29: (i23: ("" 31 "^1 (^2K) bytes") 58 58 ) "^1 (^2K) bytes" i2 + i0 01 58 F40.0(459728) + i0 01 58 03 28 28 00 00 00 00 00 40 0f 7c 40 Data: tdump21 (germano/Crosstabs.pdf) ------------- -- 2.30.2