Do a little work toward dumping the non-"light" tables.
[pspp] / dump.c
diff --git a/dump.c b/dump.c
index 4b274808558d52d2a8435f86051de6e6c4980e87..58dbd498b409a1a5edba15fac623f3bbd037078d 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -159,7 +159,7 @@ dump_value(int level)
   match_byte (0);
   if (match_byte (3))
     {
-      get_string();
+      char *s1 = get_string();
       if (match_byte (0x31))
         {
           if (match_u32 (1))
@@ -201,8 +201,12 @@ dump_value(int level)
         }
       else
         match_byte_assert (0x58);
-      get_string();
-      printf("string \"%s\"", get_string());
+      char *s2 = get_string();
+      char *s3 = get_string();
+      if (strcmp(s1, s3))
+        printf("strings \"%s\", \"%s\" and \"%s\"", s1, s2, s3);
+      else
+        printf("string \"%s\" and \"%s\"", s1, s2);
       match_byte (0);
       match_byte (0);
       match_byte (0);
@@ -1491,10 +1495,10 @@ static void
 dump_title(void)
 {
   pos = 0x27;
-  dump_title_value(0); putchar('\n'); putchar('\n');
-  dump_title_value(0); putchar('\n'); putchar('\n');
+  dump_title_value(0); putchar('\n');
+  dump_title_value(0); putchar('\n');
   match_byte_assert(0x31);
-  dump_title_value(0); putchar('\n'); putchar('\n');
+  dump_title_value(0); putchar('\n');
   match_byte(0);
   match_byte_assert(0x58);
   if (match_byte(0x31))