X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Foutput%2Fdriver.c;h=bb5aa3a8b9e2ec7cf0256dd44e96a7f3a40dee95;hb=1a4052ac93c4dd248f664107e78b52597a839066;hp=afb5084fa1d2abc0d76c59d77179fe5a86902b97;hpb=6e097c89af440da90b43ce90864394c4d0c843d5;p=pspp diff --git a/src/output/driver.c b/src/output/driver.c index afb5084fa1..bb5aa3a8b9 100644 --- a/src/output/driver.c +++ b/src/output/driver.c @@ -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,