projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
work on SAVE DATA COLLECTION
[pspp]
/
src
/
language
/
data-io
/
data-writer.c
diff --git
a/src/language/data-io/data-writer.c
b/src/language/data-io/data-writer.c
index 5f87d0060ac589a27c0713ba8cfc38ca91329642..bf9505e7dd82878270a59ab13372c2a0137720c4 100644
(file)
--- a/
src/language/data-io/data-writer.c
+++ b/
src/language/data-io/data-writer.c
@@
-92,8
+92,7
@@
dfm_open_writer (struct file_handle *fh, const char *encoding)
w = xmalloc (sizeof *w);
w->fh = fh_ref (fh);
w->lock = lock;
w = xmalloc (sizeof *w);
w->fh = fh_ref (fh);
w->lock = lock;
- w->rf = replace_file_start (fh_get_file_name (w->fh), "wb", 0666,
- &w->file, NULL);
+ w->rf = replace_file_start (w->fh, "wb", 0666, &w->file);
w->encoding = xstrdup (encoding);
w->line_ends = fh_get_line_ends (fh);
w->unit = ei.unit;
w->encoding = xstrdup (encoding);
w->line_ends = fh_get_line_ends (fh);
w->unit = ei.unit;
@@
-115,7
+114,7
@@
dfm_open_writer (struct file_handle *fh, const char *encoding)
return w;
}
return w;
}
-/* Returns
false if an I/O error occurred on WRITER, tru
e otherwise. */
+/* Returns
true if an I/O error occurred on WRITER, fals
e otherwise. */
bool
dfm_write_error (const struct dfm_writer *writer)
{
bool
dfm_write_error (const struct dfm_writer *writer)
{
@@
-219,7
+218,7
@@
dfm_close_writer (struct dfm_writer *w)
if (w->file != NULL)
{
const char *file_name = fh_get_file_name (w->fh);
if (w->file != NULL)
{
const char *file_name = fh_get_file_name (w->fh);
- ok = !dfm_write_error (w) && !fn_close (
file_name
, w->file);
+ ok = !dfm_write_error (w) && !fn_close (
w->fh
, w->file);
if (!ok)
msg (ME, _("I/O error occurred writing data file `%s'."), file_name);
if (!ok)
msg (ME, _("I/O error occurred writing data file `%s'."), file_name);