X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fsys-file-writer.c;h=3350a344854efcda877623822b7e9868b21898bb;hb=7a718e594fb0425e1e8f4ebbfa06463de8e88699;hp=e0c6eade4b158d81e457bdb263b490828500d6a8;hpb=63c7521729b947ace9e192dff9330813ecfb5812;p=pspp diff --git a/src/data/sys-file-writer.c b/src/data/sys-file-writer.c index e0c6eade4b..3350a34485 100644 --- a/src/data/sys-file-writer.c +++ b/src/data/sys-file-writer.c @@ -33,7 +33,6 @@ #include "data/casewriter.h" #include "data/dictionary.h" #include "data/file-handle-def.h" -#include "data/file-name.h" #include "data/format.h" #include "data/make-file.h" #include "data/missing-values.h" @@ -251,8 +250,7 @@ sfm_open_writer (struct file_handle *fh, struct dictionary *d, mode = 0444; if (opts.create_writeable) mode |= 0222; - w->rf = replace_file_start (fh_get_file_name (fh), "wb", mode, - &w->file, NULL); + w->rf = replace_file_start (fh, "wb", mode, &w->file); if (w->rf == NULL) { msg (ME, _("Error opening `%s' for writing as a system file: %s."), @@ -1422,6 +1420,7 @@ finish_zstream (struct sfm_writer *w) block = &w->blocks[w->n_blocks++]; block->uncompressed_size = w->zstream.total_in; block->compressed_size = w->zstream.total_out; + deflateEnd (&w->zstream); } static void