ascii: Get rid of the idea of pages.
[pspp] / src / output / driver.c
index afb5084fa1d2abc0d76c59d77179fe5a86902b97..bb5aa3a8b9e2ec7cf0256dd44e96a7f3a40dee95 100644 (file)
@@ -139,9 +139,13 @@ flush_deferred_syntax (struct output_engine *e)
 {
   if (!ds_is_empty (&e->deferred_syntax))
     {
-      char *syntax = ds_steal_cstr (&e->deferred_syntax);
-      output_submit__ (e, text_item_super (
-                         text_item_create_nocopy (TEXT_ITEM_SYNTAX, syntax)));
+      ds_trim (&e->deferred_syntax, ss_cstr ("\n"));
+      if (!ds_is_empty (&e->deferred_syntax))
+        {
+          char *syntax = ds_steal_cstr (&e->deferred_syntax);
+          output_submit__ (e, text_item_super (text_item_create_nocopy (
+                                                 TEXT_ITEM_SYNTAX, syntax)));
+        }
     }
 }
 
@@ -287,9 +291,7 @@ extern const struct output_driver_factory txt_driver_factory;
 extern const struct output_driver_factory list_driver_factory;
 extern const struct output_driver_factory html_driver_factory;
 extern const struct output_driver_factory csv_driver_factory;
-#ifdef ODF_WRITE_SUPPORT
 extern const struct output_driver_factory odt_driver_factory;
-#endif
 #ifdef HAVE_CAIRO
 extern const struct output_driver_factory pdf_driver_factory;
 extern const struct output_driver_factory ps_driver_factory;
@@ -302,9 +304,7 @@ static const struct output_driver_factory *factories[] =
     &list_driver_factory,
     &html_driver_factory,
     &csv_driver_factory,
-#ifdef ODF_WRITE_SUPPORT
     &odt_driver_factory,
-#endif
 #ifdef HAVE_CAIRO
     &pdf_driver_factory,
     &ps_driver_factory,