This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "data/casewriter.h"
#include "data/dictionary.h"
#include "data/file-handle-def.h"
#include "data/casewriter.h"
#include "data/dictionary.h"
#include "data/file-handle-def.h"
casenumber case_cnt; /* Number of cases written so far. */
uint8_t space; /* ' ' in the file's character encoding. */
casenumber case_cnt; /* Number of cases written so far. */
uint8_t space; /* ' ' in the file's character encoding. */
files have been observed, so drop back to simple compression for those
files. */
w->compression = opts.compression;
files have been observed, so drop back to simple compression for those
files. */
w->compression = opts.compression;
- 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);
/* Record-type code. */
if (is_encoding_ebcdic_compatible (dict_encoding))
write_string (w, EBCDIC_MAGIC, 4);
/* Record-type code. */
if (is_encoding_ebcdic_compatible (dict_encoding))
write_string (w, EBCDIC_MAGIC, 4);
write_string (w, ASCII_ZMAGIC, 4);
else
write_string (w, ASCII_MAGIC, 4);
write_string (w, ASCII_ZMAGIC, 4);
else
write_string (w, ASCII_MAGIC, 4);
- write_int (w, (w->compression == SFM_COMP_NONE ? 0
- : w->compression == SFM_COMP_SIMPLE ? 1
+ write_int (w, (w->compression == ANY_COMP_NONE ? 0
+ : w->compression == ANY_COMP_SIMPLE ? 1
write_case_uncompressed (w, c);
else
write_case_compressed (w, c);
write_case_uncompressed (w, c);
else
write_case_compressed (w, c);
block = &w->blocks[w->n_blocks++];
block->uncompressed_size = w->zstream.total_in;
block->compressed_size = w->zstream.total_out;
block = &w->blocks[w->n_blocks++];
block->uncompressed_size = w->zstream.total_in;
block->compressed_size = w->zstream.total_out;
write_bytes (w, w->cbuf, n);
else
write_zlib (w, w->cbuf, n);
write_bytes (w, w->cbuf, n);
else
write_zlib (w, w->cbuf, n);