output-item: Collapse the inheritance hierarchy into a single struct.
[pspp] / src / language / dictionary / sys-file-info.c
index d8a37cdd65b92d008279ac7e8ae0b84f56a9701f..68efb8ee7b6c6bbb6bb29fa81a5e8e1274e22ef3 100644 (file)
@@ -43,8 +43,7 @@
 #include "libpspp/pool.h"
 #include "libpspp/string-array.h"
 #include "output/pivot-table.h"
-#include "output/text-item.h"
-#include "output/table-item.h"
+#include "output/output-item.h"
 
 #include "gl/count-one-bits.h"
 #include "gl/localcharset.h"
@@ -706,7 +705,7 @@ display_attributes (const struct attrset *dict_attrset,
                      var_get_attributes (vars[i]), flags);
 
   if (pivot_table_is_empty (table))
-    pivot_table_destroy (table);
+    pivot_table_unref (table);
   else
     pivot_table_submit (table);
 }
@@ -1002,7 +1001,7 @@ report_encodings (const struct file_handle *h, struct pool *pool,
   /* Table of valid encodings. */
   struct pivot_table *table = pivot_table_create__ (
     pivot_value_new_text_format (N_("Usable encodings for %s."),
-                                 fh_get_name (h)));
+                                 fh_get_name (h)), "Usable Encodings");
   table->caption = pivot_value_new_text_format (
     N_("Encodings that can successfully read %s (by specifying the encoding "
        "name on the GET command's ENCODING subcommand).  Encodings that "
@@ -1040,7 +1039,8 @@ report_encodings (const struct file_handle *h, struct pool *pool,
   /* Table of alternative interpretations. */
   table = pivot_table_create__ (
     pivot_value_new_text_format (N_("%s Encoded Text Strings"),
-                                 fh_get_name (h)));
+                                 fh_get_name (h)),
+    "Alternate Encoded Text Strings");
   table->caption = pivot_value_new_text (
     N_("Text strings in the file dictionary that the previously listed "
        "encodings interpret differently, along with the interpretations."));