output-item: Collapse the inheritance hierarchy into a single struct.
[pspp] / src / language / command.c
index 0a198bc94c4f6015c128477cd9641abc42136030..3c98c3feda1e2c45a860da84072348e78184a8f5 100644 (file)
@@ -36,9 +36,8 @@
 #include "libpspp/i18n.h"
 #include "libpspp/message.h"
 #include "libpspp/str.h"
-#include "output/group-item.h"
+#include "output/output-item.h"
 
-#include "xalloc.h"
 #include "xmalloca.h"
 
 #include "gettext.h"
@@ -199,7 +198,9 @@ do_parse_command (struct lexer *lexer,
       result = CMD_FAILURE;
       goto finish;
     }
-  group_open_item_submit (group_open_item_create (command->name));
+  output_item_submit (group_open_item_create_nocopy (
+                        utf8_to_title (command->name),
+                        utf8_to_title (command->name)));
   opened = true;
 
   if (command->function == NULL)
@@ -247,7 +248,7 @@ finish:
       lex_get (lexer);
 
   if (opened)
-    group_close_item_submit (group_close_item_create ());
+    output_item_submit (group_close_item_create ());
 
   return result;
 }
@@ -442,7 +443,7 @@ report_state_mismatch (const struct command *command, enum cmd_state state)
     }
   else if (state == CMD_STATE_INPUT_PROGRAM)
     msg (SE, _("%s is not allowed inside %s."),
-        command->name, "INPUT PROGRAM" );
+        command->name, "INPUT PROGRAM");
   else if (state == CMD_STATE_FILE_TYPE)
     msg (SE, _("%s is not allowed inside %s."), command->name, "FILE TYPE");