#include <libpspp/alloc.h>
#include <libpspp/message.h>
#include <language/data-io/file-handle.h>
-#include <data/filename.h>
+#include <data/file-name.h>
#include <libpspp/str.h>
#include "gettext.h"
w = *aux = xmalloc (sizeof *w);
w->fh = fh;
- w->file = fn_open (fh_get_filename (w->fh), "wb");
+ w->file = fn_open (fh_get_file_name (w->fh), "wb");
w->bounce = NULL;
if (w->file == NULL)
{
msg (ME, _("An error occurred while opening \"%s\" for writing "
"as a data file: %s."),
- fh_get_filename (w->fh), strerror (errno));
+ fh_get_file_name (w->fh), strerror (errno));
goto error;
}
}
/* Writes record REC having length LEN to the file corresponding to
- HANDLE. REC is not null-terminated. Returns nonzero on success,
- zero on failure. */
-int
+ HANDLE. REC is not null-terminated. Returns true on success,
+ false on failure. */
+bool
dfm_put_record (struct dfm_writer *w, const char *rec, size_t len)
{
assert (w != NULL);
if (dfm_write_error (w))
- return 0;
+ return false;
if (fh_get_mode (w->fh) == FH_MODE_BINARY
&& len < fh_get_record_width (w->fh))