#include <language/data-io/file-handle.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/str.h>
#include <libpspp/taint.h>
+#include "xalloc.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
{
lex_match (lexer, '=');
+ fh_unref (fh);
fh = fh_parse (lexer, FH_REF_FILE | FH_REF_SCRATCH);
if (fh == NULL)
goto error;
proc_set_active_file (ds, reader, dict);
+ fh_unref (fh);
return CMD_SUCCESS;
error:
+ fh_unref (fh);
casereader_destroy (reader);
if (dict != NULL)
dict_destroy (dict);
map);
dict_destroy (dict);
+ fh_unref (handle);
return writer;
error:
+ fh_unref (handle);
casewriter_destroy (writer);
dict_destroy (dict);
case_map_destroy (map);
goto done;
if (nn != nv)
{
- msg (SE, _("Number of variables on left side of `=' (%d) does not "
- "match number of variables on right side (%d), in "
+ msg (SE, _("Number of variables on left side of `=' (%zu) does not "
+ "match number of variables on right side (%zu), in "
"parenthesized group %d of RENAME subcommand."),
- (unsigned) (nv - old_nv), (unsigned) (nn - old_nv), group);
+ nv - old_nv, nn - old_nv, group);
goto done;
}
if (!lex_force_match (lexer, ')'))
bool saw_in = false;
struct casereader *active_file = NULL;
- char first_name[LONG_NAME_LEN + 1] = "";
- char last_name[LONG_NAME_LEN + 1] = "";
+ char first_name[VAR_NAME_LEN + 1] = "";
+ char last_name[VAR_NAME_LEN + 1] = "";
struct taint *taint = NULL;
ll_for_each_preremove (file, struct mtf_file, ll, &mtf->files)
{
+ fh_unref (file->handle);
casereader_destroy (file->reader);
free (file->by);
dict_destroy (file->dict);