- match_byte(0);
- match_byte(0);
- match_byte(0);
- match_byte(0);
-
- for (int i = 0; i <= level; i++)
- fprintf (stream, " ");
-
- printf ("%02x: value (%d)\n", pos, data[pos]);
- if (match_byte (1))
- {
- unsigned int format;
- double value;
-
- dump_value_modifier(stream);
- format = get_u32 ();
- value = get_double ();
- fprintf (stream, "<number value=\"%.*g\" format=\"%s%d.%d\"/>\n",
- DBL_DIG, value, format_to_string(format >> 16), (format >> 8) & 0xff, format & 0xff);
- }
- else if (match_byte (2))
- {
- unsigned int format;
- char *var, *vallab;
- double value;
-
- dump_value_modifier (stream);
- format = get_u32 ();
- value = get_double ();
- var = get_string ();
- vallab = get_string ();
- fprintf (stream, "<numeric-datum value=\"%.*g\" format=\"%s%d.%d\"",
- DBL_DIG, value, format_to_string(format >> 16), (format >> 8) & 0xff, format & 0xff);
- if (var[0])
- fprintf (stream, " variable=\"%s\"", var);
- if (vallab[0])
- fprintf (stream, " label=\"%s\"", vallab);
- fprintf (stream, "/>\n");
- if (!match_byte (1) && !match_byte(2))
- match_byte_assert (3);
- }
- else if (match_byte (3))
- {
- char *text = get_string();
- dump_value_modifier(stream);
- char *identifier = get_string();
- char *text_eng = get_string();
- fprintf (stream, "<string c=\"%s\"", text_eng);
- if (identifier[0])
- fprintf (stream, " identifier=\"%s\"", identifier);
- if (strcmp(text_eng, text))
- fprintf (stream, " local=\"%s\"", text);
- fprintf (stream, "/>\n");
- if (!match_byte (0))
- match_byte_assert(1);
- }
- else if (match_byte (4))
- {
- unsigned int format;
- char *var, *vallab, *value;
-
- dump_value_modifier(stream);
- format = get_u32 ();
- vallab = get_string ();
- var = get_string ();
- if (!match_byte(1) && !match_byte(2))
- match_byte_assert (3);
- value = get_string ();
- fprintf (stream, "<string-datum value=\"%s\" format=\"%s%d.%d\"",
- value, format_to_string(format >> 16), (format >> 8) & 0xff, format & 0xff);
- if (var[0])
- fprintf (stream, " variable=\"%s\"", var);
- if (vallab[0])
- fprintf (stream, " label=\"%s\"/>\n", vallab);
- fprintf (stream, "/>\n");
- }
- else if (match_byte (5))
- {
- dump_value_modifier(stream);
- char *name = get_string ();
- char *label = get_string ();
- fprintf (stream, "<variable name=\"%s\"", name);
- if (label[0])
- fprintf (stream, " label=\"%s\"", label);
- fprintf (stream, "/>\n");
- if (!match_byte(1) && !match_byte(2))
- match_byte_assert(3);
- }
- else