format: Introduce a new type, struct fmt_settings.
[pspp] / src / output / csv.c
index 004558f1b1dee53974680f26e60a3817d93ebd05..626dc2fa5ad2c7a7b9a15898908338bed37ba378 100644 (file)
@@ -78,13 +78,13 @@ csv_create (const char *file_name, enum settings_output_devices device_type,
   output_driver_init (&csv->driver, &csv_driver_class, file_name, device_type);
 
   csv->separator = parse_string (opt (d, o, "separator", ","));
-  csv->file_name = parse_string (opt (d, o, "output-file", "pspp.csv"));
+  csv->file_name = xstrdup (file_name);
   csv->file = fn_open (csv->file_name, "w");
   csv->n_items = 0;
 
   if (csv->file == NULL)
     {
-      error (0, errno, _("csv: opening output file \"%s\""), csv->file_name);
+      error (0, errno, _("error opening output file \"%s\""), csv->file_name);
       output_driver_destroy (d);
       return NULL;
     }