X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fsys-file-writer.c;h=7f0c8c056abb1d0f39bb564bd62ae5d2f4f4d17a;hb=fb224459eed00514cbc36ecbc311c644f8b22def;hp=05d42b080ea9152ae280f6b2ccc327f87a551608;hpb=5882d195ad6891b87dba6ded8a5caa1a949f165f;p=pspp diff --git a/src/data/sys-file-writer.c b/src/data/sys-file-writer.c index 05d42b080e..7f0c8c056a 100644 --- a/src/data/sys-file-writer.c +++ b/src/data/sys-file-writer.c @@ -715,14 +715,14 @@ put_attrset (struct string *string, const struct attrset *attrs) struct attrset_iterator i; for (attr = attrset_first (attrs, &i); attr != NULL; - attr = attrset_next (attrs, &i)) + attr = attrset_next (attrs, &i)) { size_t n_values = attribute_get_n_values (attr); size_t j; ds_put_cstr (string, attribute_get_name (attr)); ds_put_byte (string, '('); - for (j = 0; j < n_values; j++) + for (j = 0; j < n_values; j++) ds_put_format (string, "'%s'\n", attribute_get_value (attr, j)); ds_put_byte (string, ')'); } @@ -787,7 +787,7 @@ write_variable_attributes (struct sfm_writer *w, const struct dictionary *d) size_t i; for (i = 0; i < n_vars; i++) - { + { struct variable *v = dict_get_var (d, i); struct attrset attrs; @@ -1420,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