Make type-03 cases more uniform.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 7 Nov 2014 05:55:16 +0000 (21:55 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 7 Nov 2014 05:55:16 +0000 (21:55 -0800)
dump.c

diff --git a/dump.c b/dump.c
index 5534255cd5ac341c1a1233a5e4000d0e2046d851..b6fbaf8d4c3393cae22f0a7cf1e23788c7a3d4d4 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))
     {
@@ -601,6 +602,8 @@ dump_title_value(int level)
                   for (int k = 0; k <= level + 1; k++)
                     printf ("    ");
                   printf ("\"%s\", \"%s\", \"%s\"", a, b, c);
+                  if (!match_byte(0))
+                    match_byte_assert(1);
                 }
               else
                 dump_title_value (level+1);