/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
bool in_syntax;
};
-const struct output_driver_class html_class;
+static const struct output_driver_class html_driver_class;
static void html_output_table (struct html_driver *, struct table_item *);
static void escape_string (FILE *file,
static struct html_driver *
html_driver_cast (struct output_driver *driver)
{
- assert (driver->class == &html_class);
+ assert (driver->class == &html_driver_class);
return UP_CAST (driver, struct html_driver, driver);
}
}
static struct output_driver *
-html_create (const char *name, enum output_device_type device_type,
+html_create (const char *file_name, enum settings_output_devices device_type,
struct string_map *o)
{
struct output_driver *d;
html = xzalloc (sizeof *html);
d = &html->driver;
- output_driver_init (&html->driver, &html_class, name, device_type);
- html->file_name = parse_string (opt (d, o, "output-file", "pspp.html"));
- html->chart_file_name = parse_chart_file_name (opt (d, o, "chart-files",
- "pspp-#.png"));
+ output_driver_init (&html->driver, &html_driver_class, file_name,
+ device_type);
+
+ html->file_name = xstrdup (file_name);
+ html->chart_file_name = parse_chart_file_name (opt (d, o, "charts",
+ file_name));
html->file = NULL;
html->chart_cnt = 1;
fputs ("</TABLE>\n\n", html->file);
}
-const struct output_driver_class html_class =
+struct output_driver_factory html_driver_factory = { "html", html_create };
+
+static const struct output_driver_class html_driver_class =
{
"html",
- html_create,
html_destroy,
html_submit,
NULL,