projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Greatly simplify PSPP configuration.
[pspp-builds.git]
/
src
/
output
/
odt.c
diff --git
a/src/output/odt.c
b/src/output/odt.c
index f02ae3defd559fbf54fb3504b78490d07b9182aa..ab38cd0411c91d779a860f86c7380896d6e425de 100644
(file)
--- a/
src/output/odt.c
+++ b/
src/output/odt.c
@@
-66,10
+66,12
@@
struct odt_driver
int table_num;
};
int table_num;
};
+static const struct output_driver_class odt_driver_class;
+
static struct odt_driver *
odt_driver_cast (struct output_driver *driver)
{
static struct odt_driver *
odt_driver_cast (struct output_driver *driver)
{
- assert (driver->class == &odt_class);
+ assert (driver->class == &odt_
driver_
class);
return UP_CAST (driver, struct odt_driver, driver);
}
return UP_CAST (driver, struct odt_driver, driver);
}
@@
-293,7
+295,7
@@
opt (struct output_driver *d, struct string_map *options, const char *key,
}
static struct output_driver *
}
static struct output_driver *
-odt_create (const char *
name, enum output_device_type
device_type,
+odt_create (const char *
file_name, enum settings_output_devices
device_type,
struct string_map *o)
{
struct output_driver *d;
struct string_map *o)
{
struct output_driver *d;
@@
-301,9
+303,9
@@
odt_create (const char *name, enum output_device_type device_type,
odt = xzalloc (sizeof *odt);
d = &odt->driver;
odt = xzalloc (sizeof *odt);
d = &odt->driver;
- output_driver_init (d, &odt_
class,
name, device_type);
+ output_driver_init (d, &odt_
driver_class, file_
name, device_type);
- odt->file_name =
parse_string (opt (d, o, "output-file", "pspp.odt")
);
+ odt->file_name =
xstrdup (file_name
);
odt->debug = parse_boolean (opt (d, o, "debug", "false"));
odt->dirname = xstrdup ("odt-XXXXXX");
odt->debug = parse_boolean (opt (d, o, "debug", "false"));
odt->dirname = xstrdup ("odt-XXXXXX");
@@
-521,11
+523,11
@@
odt_submit (struct output_driver *driver,
}
}
}
}
-/* ODT driver class. */
-const struct output_driver_class odt_class =
+struct output_driver_factory odt_driver_factory = { "odt", odt_create };
+
+static const struct output_driver_class odt_driver_class =
{
"odf",
{
"odf",
- odt_create,
odt_destroy,
odt_submit,
NULL,
odt_destroy,
odt_submit,
NULL,