Remove special case in dump_title_value().
[pspp] / dump.c
diff --git a/dump.c b/dump.c
index 5534255cd5ac341c1a1233a5e4000d0e2046d851..c4a63b0563b2ee67c7809d54805f8f9e6f4bd3d0 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -224,8 +224,8 @@ dump_value(int level)
         printf("strings \"%s\", \"%s\" and \"%s\"", s1, s2, s3);
       else
         printf("string \"%s\" and \"%s\"", s1, s2);
-      match_byte (0);
-      match_byte (1);
+      if (!match_byte (0))
+        match_byte_assert(1);
       match_byte (1);
     }
   else if (match_byte (5))
@@ -344,8 +344,8 @@ dump_dim_value(int level)
       dump_value_31();
       get_string();
       printf("string \"%s\"", get_string());
-      match_byte (0);
-      match_byte (1);
+      if (!match_byte (0))
+        match_byte_assert(1);
     }
   else if (match_byte (5))
     {
@@ -467,7 +467,8 @@ dump_data_value(void)
       dump_value_31();
       get_string();
       printf("string \"%s\"", get_string());
-      match_byte (0);
+      if (!match_byte (0))
+        match_byte_assert(1);
     }
   else if (match_byte (2))
     {
@@ -591,19 +592,7 @@ dump_title_value(int level)
           printf("variable %d has %d values:\n", i, y);
           for (int j = 0; j < y; j++)
             {
-              match_byte(0);
-              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 <= level + 1; k++)
-                    printf ("    ");
-                  printf ("\"%s\", \"%s\", \"%s\"", a, b, c);
-                }
-              else
-                dump_title_value (level+1);
+              dump_title_value (level+1);
               putchar('\n');
             }
         }