From: Ben Pfaff Date: Fri, 7 Nov 2014 05:38:55 +0000 (-0800) Subject: Factor out trailing match_bytes() from dump_value(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15fc2764275a2df5c8c05605f32f74a39a0b754b;p=pspp Factor out trailing match_bytes() from dump_value(). --- diff --git a/dump.c b/dump.c index 1f5f8dc079..789daa97a8 100644 --- a/dump.c +++ b/dump.c @@ -227,9 +227,6 @@ dump_value(int level) match_byte (0); match_byte (1); match_byte (1); - match_byte (0); - match_byte (0); - match_byte (0); } else if (match_byte (5)) { @@ -238,9 +235,6 @@ dump_value(int level) get_string(); if (!match_byte(1) && !match_byte(2)) match_byte_assert(3); - match_byte (0); - match_byte (0); - match_byte (0); } else if (match_byte (2)) { @@ -257,9 +251,6 @@ dump_value(int level) value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab); if (!match_byte (1) && !match_byte(2)) match_byte_assert (3); - match_byte (0); - match_byte (0); - match_byte (0); } else if (match_byte (4)) { @@ -275,9 +266,6 @@ dump_value(int level) value = get_string (); printf ("value \"%s\" format %d(%d.%d) var \"%s\" vallab \"%s\"", value, format >> 16, (format >> 8) & 0xff, format & 0xff, var, vallab); - match_byte (0); - match_byte (0); - match_byte (0); } else if (match_byte (1)) { @@ -289,9 +277,6 @@ dump_value(int level) value = get_double (); printf ("value %g format %d(%d.%d)", value, format >> 16, (format >> 8) & 0xff, format & 0xff); match_byte (1); - match_byte (0); - match_byte (0); - match_byte (0); } else { @@ -342,6 +327,9 @@ dump_value(int level) } } } + match_byte(0); + match_byte(0); + match_byte(0); } static void