- fprintf (fp, "application/vnd.oasis.opendocument.text");
- fclose (fp);
-
- return true;
-}
-
-/* Create a new XML file called FILENAME in the temp directory, and return a writer for it */
-static xmlTextWriterPtr
-create_writer (const struct odt_driver *driver, const char *filename)
-{
- char *copy = NULL;
- xmlTextWriterPtr w;
- struct string str;
- ds_init_cstr (&str, driver->dirname);
- ds_put_cstr (&str, "/");
- ds_put_cstr (&str, filename);
-
- /* dirname modifies its argument, so we must copy it */
- copy = xstrdup (ds_cstr (&str));
- mkdir (dirname (copy), 0700);
- free (copy);
-
- w = xmlNewTextWriterFilename (ds_cstr (&str), 0);
-
- ds_destroy (&str);
-
- xmlTextWriterStartDocument (w, NULL, "UTF-8", NULL);
-
- return w;
+ xmlTextWriterStartDocument (*w, NULL, "UTF-8", NULL);