X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fodt.c;h=2bf1f2956e47a8e498ce4d0e2be17da1a4529b76;hb=da8c6e44f6e8acaa04887901da4d835437221ccf;hp=fdaa6f902de642efbd7a438a745e67feb21e56f2;hpb=fe8dc2171009e90d2335f159d05f7e6660e24780;p=pspp diff --git a/src/output/odt.c b/src/output/odt.c index fdaa6f902d..2bf1f2956e 100644 --- a/src/output/odt.c +++ b/src/output/odt.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011, 2012 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 @@ -31,6 +31,7 @@ #include "libpspp/assertion.h" #include "libpspp/cast.h" +#include "libpspp/message.h" #include "libpspp/str.h" #include "libpspp/temp-file.h" #include "libpspp/version.h" @@ -44,7 +45,6 @@ #include "output/text-item.h" #include "gl/xalloc.h" -#include "gl/error.h" #include "gettext.h" #define _(msgid) gettext (msgid) @@ -91,7 +91,7 @@ create_mimetype (struct zip_writer *zip) fp = create_temp_file (); if (fp == NULL) { - error (0, errno, _("error creating temporary file")); + msg_error (errno, _("error creating temporary file")); return false; } @@ -380,6 +380,7 @@ odt_destroy (struct output_driver *driver) zip_writer_close (odt->zip); } + free (odt->file_name); free (odt->command_name); free (odt); } @@ -516,7 +517,8 @@ odt_submit (struct output_driver *driver, } } -struct output_driver_factory odt_driver_factory = { "odt", odt_create }; +struct output_driver_factory odt_driver_factory = + { "odt", "pspp.odf", odt_create }; static const struct output_driver_class odt_driver_class = {