rotation works and is tested
[pspp] / src / data / any-writer.c
index 61d6ffc8a26ec5c53501f0dc38aa20078cad8280..ba4149d78bab2e711b3ae8f7e0c8ec5210eebd28 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "data/any-writer.h"
 
-#include <assert.h>
 #include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -38,7 +37,8 @@
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-/* Creates and returns a writer for HANDLE with the given DICT. */
+/* Creates and returns a writer for HANDLE with the given DICT.  The caller
+  retains ownership of DICT, which might get modified to assign short names. */
 struct casewriter *
 any_writer_open (struct file_handle *handle, struct dictionary *dict)
 {
@@ -49,7 +49,7 @@ any_writer_open (struct file_handle *handle, struct dictionary *dict)
         struct casewriter *writer;
         char *extension;
 
-        extension = fn_extension (fh_get_file_name (handle));
+        extension = fn_extension (handle);
         str_lowercase (extension);
 
         if (!strcmp (extension, ".por"))