void
output_engine_push (void)
{
- struct output_engine *e = xzalloc (sizeof (*e));
+ struct output_engine *e = XZALLOC (struct output_engine);
llx_init (&e->drivers);
case OUTPUT_ITEM_GROUP:
case OUTPUT_ITEM_IMAGE:
case OUTPUT_ITEM_PAGE_BREAK:
- case OUTPUT_ITEM_PAGE_SETUP:
case OUTPUT_ITEM_TABLE:
break;
}
char *s = xvasprintf (format, args);
va_end (args);
+ output_log_nocopy (s);
+}
+
+void
+output_log_nocopy (char *s)
+{
output_submit (text_item_create_nocopy (TEXT_ITEM_LOG, s, NULL));
}
+const char *
+output_get_title (void)
+{
+ return engine_stack_top ()->title;
+}
+
void
output_set_title (const char *title)
{
output_set_title__ (e, &e->title, title);
}
+const char *
+output_get_subtitle (void)
+{
+ return engine_stack_top ()->subtitle;
+}
+
void
output_set_subtitle (const char *subtitle)
{
{
return output_driver_get_engine (driver) != NULL;
}
+
+void
+output_set_page_setup (const struct page_setup *ps)
+{
+ struct output_engine *e = engine_stack_top ();
+
+ struct llx *llx;
+ llx_for_each (llx, &e->drivers)
+ {
+ struct output_driver *d = llx_data (llx);
+ if (d->class->setup)
+ d->class->setup (d, ps);
+ }
+}
\f
extern const struct output_driver_factory csv_driver_factory;
extern const struct output_driver_factory html_driver_factory;