From: Ben Pfaff <blp@gnu.org>
Date: Sun, 21 Feb 2010 21:19:29 +0000 (-0800)
Subject: csv: Fix setting output file name.
X-Git-Tag: sav-api~374
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fbuilds%2F20100222040508%2Fpspp;p=pspp

csv: Fix setting output file name.

The output file named used to be provided as an option named "output-file",
but now it is a separate argument to the "create" function.  This had
been overlooked for the CSV driver, so that it always produced output in
a file named "pspp.csv", but this commit fixes the problem.
---

diff --git a/src/output/csv.c b/src/output/csv.c
index ceca34dd0e..626dc2fa5a 100644
--- a/src/output/csv.c
+++ b/src/output/csv.c
@@ -78,7 +78,7 @@ 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;