projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add mutual links to VARIABLE/DATAFILE ATTRIBUTE documentation
[pspp]
/
src
/
language
/
data-io
/
inpt-pgm.c
diff --git
a/src/language/data-io/inpt-pgm.c
b/src/language/data-io/inpt-pgm.c
index 59d7bfa72c2d6abcf2fa6a3ff5ac6d4e90e9ba56..609c9b2c92bec4b85894b6ab26daca928b0031d9 100644
(file)
--- a/
src/language/data-io/inpt-pgm.c
+++ b/
src/language/data-io/inpt-pgm.c
@@
-33,7
+33,6
@@
#include <language/data-io/file-handle.h>
#include <language/expressions/public.h>
#include <language/lexer/lexer.h>
#include <language/data-io/file-handle.h>
#include <language/expressions/public.h>
#include <language/lexer/lexer.h>
-#include <libpspp/alloc.h>
#include <libpspp/assertion.h>
#include <libpspp/compiler.h>
#include <libpspp/message.h>
#include <libpspp/assertion.h>
#include <libpspp/compiler.h>
#include <libpspp/message.h>
@@
-41,6
+40,8
@@
#include <libpspp/misc.h>
#include <libpspp/str.h>
#include <libpspp/misc.h>
#include <libpspp/str.h>
+#include "xalloc.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "gettext.h"
#define _(msgid) gettext (msgid)
@@
-295,6
+296,7
@@
cmd_reread (struct lexer *lexer, struct dataset *ds)
else if (lex_match_id (lexer, "FILE"))
{
lex_match (lexer, '=');
else if (lex_match_id (lexer, "FILE"))
{
lex_match (lexer, '=');
+ fh_unref (fh);
fh = fh_parse (lexer, FH_REF_FILE | FH_REF_INLINE);
if (fh == NULL)
{
fh = fh_parse (lexer, FH_REF_FILE | FH_REF_INLINE);
if (fh == NULL)
{
@@
-315,6
+317,7
@@
cmd_reread (struct lexer *lexer, struct dataset *ds)
t->column = e;
add_transformation (ds, reread_trns_proc, reread_trns_free, t);
t->column = e;
add_transformation (ds, reread_trns_proc, reread_trns_free, t);
+ fh_unref (fh);
return CMD_SUCCESS;
}
return CMD_SUCCESS;
}
@@
-329,7
+332,7
@@
reread_trns_proc (void *t_, struct ccase *c, casenumber case_num)
else
{
double column = expr_evaluate_num (t->column, c, case_num);
else
{
double column = expr_evaluate_num (t->column, c, case_num);
- if (!finite (column) || column < 1)
+ if (!
is
finite (column) || column < 1)
{
msg (SE, _("REREAD: Column numbers must be positive finite "
"numbers. Column set to 1."));
{
msg (SE, _("REREAD: Column numbers must be positive finite "
"numbers. Column set to 1."));