From: Ben Pfaff Date: Sat, 4 Jul 2020 05:33:10 +0000 (+0000) Subject: Make a few other tables work. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=8dc6ac4fc9db5dd3dd0a9fba73179c60d287214e Make a few other tables work. --- diff --git a/dump-spo2.c b/dump-spo2.c index ff9e530069..70622943e0 100644 --- a/dump-spo2.c +++ b/dump-spo2.c @@ -714,7 +714,7 @@ parse_category(int level, int j, int *n_leaves) match_u32_assert(0); if (get_u16() == 0xffff) match_u16_assert(0xffff); - else + else if (!match_u16(0)) match_u16_assert(0x0e74); match_byte_assert(0); match_DspSimpleText(); @@ -724,6 +724,14 @@ parse_category(int level, int j, int *n_leaves) data[pos], data[pos + 1], data[pos + 2]); pos += 3; } + if (match_u16(0x8011)) + { + printf("11 80("); + pos += 2; + for (size_t i = 0; i < 16; i++) + printf("%s%02x", i > 0 ? " " : "", data[pos++]); + printf(") "); + } match_DspString(); int n_subcategories = get_u32(); @@ -745,7 +753,6 @@ parse_dimension(int i) if (i == 0) { match_zeros_assert(5); - match_u32_assert(1); } else { @@ -768,9 +775,11 @@ parse_dimension(int i) get_u16(); match_byte_assert(0); get_u16(); match_byte_assert(0); match_u32_assert(0); - match_u32_assert(1); } + if (!match_u32(0)) + match_u32_assert(1); + get_u16(); if (!match_u16(0xffff)) match_u16_assert(0x0e74); @@ -884,7 +893,8 @@ parse_NavNote(void) if (!match_u32(0) && !match_u32(0xffffff4b)) match_u32_assert(-40); pos += 8; - match_u32_assert(2); + if (!match_u32(1)) + match_u32_assert(2); if (!match_u32(2)) match_u32_assert(1); } @@ -1127,7 +1137,7 @@ parse_flexible(void) match_byte_assert(0); } } - else if (data[pos] == 0x17) + else if (data[pos] == 0x17 || data[pos] == 0x25) { printf("%02x %02x(%02x %02x %02x)\n", data[pos], data[pos + 1],