From: Ben Pfaff Date: Sun, 21 Feb 2010 21:19:29 +0000 (-0800) Subject: csv: Fix setting output file name. X-Git-Tag: v0.7.5~133 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b788989195483175d0b920178a2417d31c04c1a1;p=pspp-builds.git 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 ceca34dd..626dc2fa 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;