From: Ben Pfaff Date: Sat, 3 Aug 2013 20:38:03 +0000 (-0700) Subject: pspp-dump-sav: Print a new-line following text record content. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1708f027dfb623031bcccf2cee84aa4511fb824;p=pspp pspp-dump-sav: Print a new-line following text record content. Text records don't necessarily end in a new-line so this ensures that the next line of output starts at the beginning of a line. --- diff --git a/utilities/pspp-dump-sav.c b/utilities/pspp-dump-sav.c index a3aad0bf24..98cb6f3b22 100644 --- a/utilities/pspp-dump-sav.c +++ b/utilities/pspp-dump-sav.c @@ -1070,17 +1070,20 @@ read_unknown_extension (struct sfm_reader *r, size_t size, size_t count) buffer = xmalloc (count); read_bytes (r, buffer, count); if (memchr (buffer, 0, count) == 0) - for (i = 0; i < count; i++) - { - unsigned char c = buffer[i]; - - if (c == '\\') - printf ("\\\\"); - else if (c == '\n' || isprint (c)) - putchar (c); - else - printf ("\\%02x", c); - } + { + for (i = 0; i < count; i++) + { + unsigned char c = buffer[i]; + + if (c == '\\') + printf ("\\\\"); + else if (c == '\n' || isprint (c)) + putchar (c); + else + printf ("\\%02x", c); + } + putchar ('\n'); + } else hex_dump (0, buffer, count); free (buffer);