#include <data/case-source.h>
#include <data/case.h>
#include <data/casefile.h>
+#include <data/fastfile.h>
#include <data/dictionary.h>
#include <data/por-file-writer.h>
#include <data/procedure.h>
#include <language/lexer/lexer.h>
#include <language/lexer/variable-parser.h>
#include <libpspp/alloc.h>
+#include <libpspp/assertion.h>
#include <libpspp/compiler.h>
#include <libpspp/hash.h>
#include <libpspp/message.h>
}
else
aw->writer = any_writer_open (handle, dict);
+ if (aw->writer == NULL)
+ goto error;
dict_destroy (dict);
return aw;
/* Writes case C to the system file specified on XSAVE or XEXPORT. */
static int
-output_trns_proc (void *trns_, struct ccase *c, int case_num UNUSED)
+output_trns_proc (void *trns_, struct ccase *c, casenum_t case_num UNUSED)
{
struct output_trns *t = trns_;
case_writer_write_case (t->aw, c);
saw_table = true;
}
else
- assert (0);
+ NOT_REACHED ();
lex_match ('=');
file->by = NULL;
discard_variables ();
dict_compact_values (mtf.dict);
- mtf.output = casefile_create (dict_get_next_value_idx (mtf.dict));
+ mtf.output = fastfile_create (dict_get_next_value_idx (mtf.dict));
mtf.seq_nums = xcalloc (dict_get_var_cnt (mtf.dict), sizeof *mtf.seq_nums);
case_create (&mtf.mtf_case, dict_get_next_value_idx (mtf.dict));
if (iter->handle == NULL)
{
if (!mtf_delete_file_in_place (mtf, &iter))
- abort ();
+ NOT_REACHED ();
break;
}