fbuf: New data structure for buffered file I/O.
[pspp] / utilities / pspp-convert.c
index cd760199d3813340626727db584c85e13bca992c..ad91ef9da2c937570d3538a4b7eff78baa6ef3e1 100644 (file)
@@ -203,6 +203,8 @@ main (int argc, char *argv[])
              output_filename);
       NOT_REACHED ();
     }
+  if (!writer)
+    error (1, 0, _("%s: error opening output file"), output_filename);
 
   for (i = 0; i < max_cases; i++)
     {
@@ -260,7 +262,7 @@ decrypt_file (struct encrypted_file *enc,
   if (!encrypted_file_unlock (enc, password))
     error (1, 0, _("sorry, wrong password"));
 
-  out = fn_open (ofh, "wb");
+  out = fn_fopen (ofh, "wb");
   if (out == NULL)
     error (1, errno, ("%s: error opening output file"), output_filename);