Fix PostScript output of multiple charts.
[pspp] / src / language / data-io / print.c
index 52828400f9382194b4e3c25f0e3f95f06612b7d2..63270160d949dd9654776fd13ffa4e8572415cd0 100644 (file)
 /* FIXME: seems like a lot of code duplication with data-list.c. */
 
 #include <config.h>
-#include <libpspp/message.h>
+
 #include <stdlib.h>
-#include <libpspp/alloc.h>
+
 #include <data/case.h>
+#include <data/procedure.h>
+#include <data/transformations.h>
+#include <data/variable.h>
 #include <language/command.h>
-#include <libpspp/compiler.h>
 #include <language/data-io/data-writer.h>
-#include <libpspp/message.h>
-#include <language/expressions/public.h>
 #include <language/data-io/file-handle.h>
+#include <language/expressions/public.h>
 #include <language/lexer/lexer.h>
+#include <libpspp/alloc.h>
+#include <libpspp/compiler.h>
+#include <libpspp/message.h>
+#include <libpspp/message.h>
 #include <libpspp/misc.h>
 #include <output/manager.h>
 #include <output/table.h>
-#include <data/variable.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -846,13 +850,6 @@ dump_table (const struct file_handle *fh)
   tab_submit (t);
 }
 
-/* PORTME: The number of characters in a line terminator. */
-#ifdef __MSDOS__ 
-#define LINE_END_WIDTH 2       /* \r\n */
-#else
-#define LINE_END_WIDTH 1       /* \n */
-#endif
-
 /* Calculates the maximum possible line width and allocates a buffer
    big enough to contain it */
 static void
@@ -891,7 +888,7 @@ alloc_line (void)
       if (pot_w > w)
        w = pot_w;
     }
-  prt.max_width = w + LINE_END_WIDTH + 1;
+  prt.max_width = w + 2;
   prt.line = xmalloc (prt.max_width);
 }
 \f
@@ -933,13 +930,7 @@ print_trns_proc (void *trns_, struct ccase *c, int case_num UNUSED)
          {
            if ((t->options & PRT_CMD_MASK) == PRT_PRINT
                 || !(t->options & PRT_BINARY))
-             {
-               /* PORTME: Line ends. */
-#ifdef __MSDOS__
-               buf[len++] = '\r';
-#endif
-               buf[len++] = '\n';
-             }
+              buf[len++] = '\n';
 
            dfm_put_record (t->writer, buf, len);
          }