static void dump_value(int level);
static void
-dump_value__(int level)
+dump_value__(int level, bool match1)
{
if (match_byte (3))
{
printf("string \"%s\" and \"%s\"", s1, s2);
if (!match_byte (0))
match_byte_assert(1);
- match_byte (1);
+ if (match1)
+ match_byte (1);
}
else if (match_byte (5))
{
format = get_u32 ();
value = get_double ();
printf ("value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
- match_byte (1);
+ if (match1)
+ match_byte (1);
}
else
{
match_byte (0);
match_byte (0);
match_byte (0);
- dump_value__(level);
+ dump_value__(level, true);
match_byte(0);
match_byte(0);
match_byte(0);
printf (" ");
if (data[pos] == 3 || data[pos] == 5)
- dump_value__(level);
+ dump_value__(level, true);
else
dump_value(level);
}
match_byte(0);
match_byte(0);
match_byte(0);
- if (match_byte (1))
- {
- unsigned int format;
- double value;
-
- dump_value_31();
- format = get_u32 ();
- value = get_double ();
- printf (" value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
- }
- else if (match_byte (3))
- {
- get_string();
- dump_value_31();
- get_string();
- printf("string \"%s\"", get_string());
- if (!match_byte (0))
- match_byte_assert(1);
- }
- else if (data[pos] == 2 || data[pos] == 4)
- dump_value__(0);
+ if (data[pos] == 2 || data[pos] == 4 || data[pos] == 3 || data[pos] == 1)
+ dump_value__(0, false);
else if (data[pos] == 5)
dump_value (0);
else
if (data[pos] == 3 || data[pos] == 2 || data[pos] == 4 || data[pos] == 1)
dump_value(level);
else if (data[pos] == 5)
- dump_value__(level);
+ dump_value__(level, true);
else
{
dump_value_31();
match_byte (0);
if (data[pos] == 2 || data[pos] == 4)
dump_value(level);
- else if (data[pos] == 5)
- dump_value__(level);
- else if (match_byte (3))
- {
- get_string();
- dump_value_31();
- get_string();
- printf("string \"%s\"", get_string());
- if (!match_byte (0))
- match_byte_assert (1);
- }
- else if (match_byte (1))
- {
- unsigned int format;
- double value;
-
- dump_value_31();
- format = get_u32 ();
- value = get_double ();
- printf ("value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff);
- }
+ else if (data[pos] == 5 || data[pos] == 3 || data[pos] == 1)
+ dump_value__(level, false);
else
{
dump_value_31();