Make a few other tables work.
[pspp] / dump-spo2.c
index a7100e60689792445d0af54aa6dcbde8b0765390..70622943e0057c8522bf5ab65b353860b727f380 100644 (file)
@@ -714,10 +714,24 @@ 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();
+  if (match_u16(0x8018))
+    {
+      printf("18 80(%02x %02x %02x) ",
+             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();
@@ -739,7 +753,6 @@ parse_dimension(int i)
   if (i == 0)
     {
       match_zeros_assert(5);
-      match_u32_assert(1);
     }
   else
     {
@@ -762,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);
@@ -878,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);
 }
@@ -1121,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],