From 5e8dc11972a75e746ca9ed45ffacf8b84e4fdabd Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 1 Nov 2014 21:40:04 -0700 Subject: [PATCH] Fix one data case. --- dump.c | 18 +++++++++++++++--- notes | 29 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/dump.c b/dump.c index 952cf7336e..6f567bcd7d 100644 --- a/dump.c +++ b/dump.c @@ -657,12 +657,13 @@ dump_dims(void) static void dump_data(void) { - if (!match_u32 (0) || !match_u32 (1) || !match_u32(1) || !match_u32(0) || !match_u32(1)) +#if 1 + if (!match_u32 (0) || !match_u32 (1) || !match_u32(1) || !match_u32(0) || (!match_u32(1) && !match_u32(13))) { printf ("skipping data\n"); return; } -#if 0 +#else fprintf (stderr,"data intro:"); for (int i = 0; i < 5; i++) fprintf (stderr," %d", get_u32()); @@ -674,6 +675,10 @@ dump_data(void) { printf("%08x, index %d:\n", pos, get_u32()); match_u32_assert(0); + match_byte(0); + match_byte(0); + match_byte(0); + match_byte(0); if (match_byte (1)) { unsigned int format; @@ -702,7 +707,14 @@ dump_data(void) get_string(); if (match_byte (0x31)) { - if (match_u32 (1)) + if (match_u32 (0)) + { + match_u32_assert (1); + 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); diff --git a/notes b/notes index 0d65cf55c0..b3dfe7d2d0 100644 --- a/notes +++ b/notes @@ -1443,6 +1443,35 @@ web/f748b5e575e0a0c2e55698c3b18d272e/00000000134_lightTableData.bin (Report): 1e i1 00 00 00 02 58 F40.0(522773) "V4" 00 00 00 00 02 2d i1 00 00 00 02 58 F40.0(sysmis) "V4" 00 00 00 00 02 +web/f748b5e575e0a0c2e55698c3b18d272e/00000000134_lightTableData.bin (Report): + + i497 i0 04 58 00 19 i1 00 00 "V5" 02 "% of total particles" + i512 04 58 00 19 i1 00 00 "V5" 02 "322." + 0f i2 00 00 00 04 58 00 19 i1 00 00 "V5" 02 "% of total mass" + 1e i2 00 00 00 04 58 00 19 i1 00 00 "V5" 02 "% of total particles" + 2d i2 00 00 00 04 58 00 19 i1 00 00 "V5" 02 "581." + +germano/Crosstabs/00000000014_lightTableData.bin (Crosstabulation): + + i0 i2 i1 i2 i0 + + i1 + + i432 i0 i0 03 "<5 " + 31 i0 i1 "a" i11 i5 00 00 00 00 58 58 58 00 00 00 00 + "<5 " 00 + i96 00 00 00 00 03 "<5 " + i49 00 i1 "a" i11 i5 00 00 00 00 58 58 58 00 00 00 00 + "<5 " 00 + i192 00 00 00 00 03 "<5 " + i49 00 i1 "a" i11 i5 00 00 00 00 58 58 58 00 00 00 00 + "<5 " 00 + 20 i1 00 00 00 03 "<5 " + i49 00 i1 "a" i11 i5 00 00 00 00 58 58 58 00 00 00 00 + "<5 " 00 + 80 i1 00 00 00 01 58 F40.0(12) + i8 00 00 00 00 01 i49 00 i1 "a" i11 i5 00 00 00 00 58 58 58 F40.0(5) + Data: tdump21 (germano/Crosstabs.pdf) ------------- -- 2.30.2