From c1708f027dfb623031bcccf2cee84aa4511fb824 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@cs.stanford.edu>
Date: Sat, 3 Aug 2013 13:38:03 -0700
Subject: [PATCH] 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.
---
 utilities/pspp-dump-sav.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

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);
-- 
2.30.2