fbuf: New data structure for buffered file I/O.
[pspp] / src / data / por-file-writer.c
index 3a4e88e7f0cb6e5c6b5a545340e00f8168d7723d..1853ad3a56a5877e265abbff7b2f5caa35313112 100644 (file)
@@ -32,7 +32,6 @@
 #include "data/casewriter.h"
 #include "data/dictionary.h"
 #include "data/file-handle-def.h"
-#include "data/file-name.h"
 #include "data/format.h"
 #include "data/make-file.h"
 #include "data/missing-values.h"
@@ -153,8 +152,7 @@ pfm_open_writer (struct file_handle *fh, struct dictionary *dict,
   mode = 0444;
   if (opts.create_writeable)
     mode |= 0222;
-  w->rf = replace_file_start (fh, "w", mode,
-                              &w->file);
+  w->rf = replace_file_start (fh, false, mode, &w->file);
   if (w->rf == NULL)
     {
       msg (ME, _("Error opening `%s' for writing as a portable file: %s."),
@@ -328,12 +326,12 @@ write_variables (struct pfm_writer *w, struct dictionary *dict)
 
   short_names_assign (dict);
 
-  if (dict_get_weight (dict) != NULL) 
+  if (dict_get_weight (dict) != NULL)
     {
       buf_write (w, "6", 1);
       write_string (w, var_get_short_name (dict_get_weight (dict), 0));
     }
-  
+
   buf_write (w, "4", 1);
   write_int (w, dict_get_var_cnt (dict));