output-item: Collapse the inheritance hierarchy into a single struct.
[pspp] / tests / output / pivot-table-test.c
index 60053e9ba8a6234850543e52daf14e2c54e23082..bf275b20d68e4a7fb1bc85e236bbb8de240920a9 100644 (file)
 #include "libpspp/i18n.h"
 #include "libpspp/string-map.h"
 #include "output/driver.h"
-#include "output/message-item.h"
 #include "output/options.h"
+#include "output/output-item.h"
 #include "output/pivot-table.h"
-#include "output/table-item.h"
 
 #include "gl/error.h"
 #include "gl/progname.h"
@@ -129,7 +128,6 @@ configure_drivers (int width, int length UNUSED, int min_break)
   register_driver (&options, "-");
 
 
-#ifdef HAVE_CAIRO
   /* Render to <base>.pdf. */
   string_map_insert (&options, "top-margin", "0");
   string_map_insert (&options, "bottom-margin", "0");
@@ -138,7 +136,6 @@ configure_drivers (int width, int length UNUSED, int min_break)
   string_map_insert (&options, "paper-size", "99x99in");
   string_map_insert (&options, "trim", "true");
   register_driver (&options, "%s.pdf", output_base);
-#endif
 
   string_map_insert (&options, "box", "unicode");
   register_driver (&options, "%s.txt", output_base);
@@ -936,7 +933,8 @@ read_footnote (struct lexer *lexer, struct pivot_table *pt)
   else
     marker = NULL;
 
-  pivot_table_create_footnote__ (pt, idx, marker, content);
+  bool show = !lex_match_id (lexer, "HIDE");
+  pivot_table_create_footnote__ (pt, idx, marker, content)->show = show;
 }
 
 static void
@@ -1238,9 +1236,9 @@ output_msg (const struct msg *m_, void *lexer_)
       m.last_line = lex_get_last_line_number (lexer, 0);
     }
 
-  m.command_name = output_get_command_name ();
+  m.command_name = output_get_uppercase_command_name ();
 
-  message_item_submit (message_item_create (&m));
+  output_item_submit (message_item_create (&m));
 
   free (m.command_name);
 }