#include <stdlib.h>
#include <string.h>
-#include "data/file-name.h"
+#include "data/file-handle-def.h"
#include "data/settings.h"
#include "libpspp/array.h"
#include "libpspp/assertion.h"
{
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)));
+ }
}
}
{
struct output_engine *e = engine_stack_top ();
+ if (item == NULL)
+ return;
+
if (is_syntax_item (item))
{
ds_put_cstr (&e->deferred_syntax, text_item_get_text (to_text_item (item)));
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;
&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,
device_type = default_device_type (file_name);
}
- driver = f->create (file_name, device_type, options);
+ struct file_handle *fh = fh_create_file (NULL, file_name, NULL, fh_default_properties ());
+
+ driver = f->create (fh, device_type, options);
if (driver != NULL)
{
const struct string_map_node *node;