output-item: Make label a part of every output_item.
[pspp] / src / language / data-io / print.c
index 5ee7fdd36998b12a0f46e7411255691da0d3117c..7111c03c65a6e98f42bab1407433e7f94d853ee1 100644 (file)
@@ -42,6 +42,7 @@
 #include "libpspp/u8-line.h"
 #include "output/pivot-table.h"
 #include "output/table.h"
+#include "output/page-eject-item.h"
 #include "output/text-item.h"
 
 #include "gl/xalloc.h"
@@ -450,7 +451,7 @@ dump_table (struct print_trns *trns)
                         pivot_value_new_integer (spec->record));
       int last_column = spec->first_column + spec->format.w - 1;
       pivot_table_put2 (table, 1, row, pivot_value_new_user_text_nocopy (
-                          xasprintf ("%3d-%3d",
+                          xasprintf ("%d-%d",
                                      spec->first_column, last_column)));
 
       char fmt_string[FMT_STRING_LEN_MAX + 1];
@@ -555,14 +556,16 @@ print_text_flush_records (struct print_trns *trns, struct u8_line *line,
         {
           *eject = false;
           if (trns->writer == NULL)
-            text_item_submit (text_item_create (TEXT_ITEM_EJECT_PAGE, ""));
+            page_eject_item_submit (page_eject_item_create ());
           else
             leader = '1';
         }
       *u8_line_reserve (line, 0, 1, 1) = leader;
 
       if (trns->writer == NULL)
-        table_output_text (TAB_FIX, ds_cstr (&line->s) + 1);
+        text_item_submit (text_item_create (TEXT_ITEM_LOG,
+                                            ds_cstr (&line->s) + 1,
+                                            NULL));
       else
         {
           size_t len = ds_length (&line->s);