-static void
-flush_deferred_syntax (void)
-{
- if (deferred_syntax != NULL)
- {
- output_submit__ (deferred_syntax);
- deferred_syntax = NULL;
- }
-}
-
-/* Submits ITEM to the configured output drivers, and transfers ownership to
- the output subsystem. */
-void
-output_submit (struct output_item *item)
-{
- if (is_text_item (item))
- {
- struct text_item *text = to_text_item (item);
- switch (text_item_get_type (text))
- {
- case TEXT_ITEM_SYNTAX:
- if (!in_command)
- {
- flush_deferred_syntax ();
- deferred_syntax = item;
- return;
- }
- break;
-
- case TEXT_ITEM_COMMAND_OPEN:
- output_submit__ (item);
- flush_deferred_syntax ();
- in_command = true;
- return;
-
- case TEXT_ITEM_COMMAND_CLOSE:
- in_command = false;
- break;
-
- default:
- break;
- }
- }
-
- output_submit__ (item);
-}
-