- const struct message_item *message_item = to_message_item (item);
- const struct msg *msg = message_item_get_msg (message_item);
- char *s = msg_to_string (msg, message_item->command_name);
- journal_output (j, s);
- free (s);
+ case OUTPUT_ITEM_MESSAGE:
+ journal_output (j, msg_to_string (item->message));
+ break;
+
+ case OUTPUT_ITEM_TEXT:
+ if (item->text.subtype == TEXT_ITEM_SYNTAX)
+ journal_output (j, text_item_get_plain_text (item));
+ break;
+
+ case OUTPUT_ITEM_CHART:
+ case OUTPUT_ITEM_GROUP_OPEN:
+ case OUTPUT_ITEM_GROUP_CLOSE:
+ case OUTPUT_ITEM_IMAGE:
+ case OUTPUT_ITEM_PAGE_BREAK:
+ case OUTPUT_ITEM_PAGE_SETUP:
+ case OUTPUT_ITEM_TABLE:
+ break;