X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Finpt-pgm.c;h=609c9b2c92bec4b85894b6ab26daca928b0031d9;hb=37f8a4cc05e3e99f0219ed2765ed242e63464857;hp=1c2625a24383d193dca4d2f000d273b0e06232b1;hpb=76f3a20db3fd092560fac22c3e8c03958f7136b4;p=pspp-builds.git
diff --git a/src/language/data-io/inpt-pgm.c b/src/language/data-io/inpt-pgm.c
index 1c2625a2..609c9b2c 100644
--- a/src/language/data-io/inpt-pgm.c
+++ b/src/language/data-io/inpt-pgm.c
@@ -1,20 +1,18 @@
-/* PSPP - computes sample statistics.
+/* PSPP - a program for statistical analysis.
Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
- 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 the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ 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
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with this program. If not, see . */
#include
@@ -35,7 +33,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -43,6 +40,8 @@
#include
#include
+#include "xalloc.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
@@ -297,6 +296,7 @@ cmd_reread (struct lexer *lexer, struct dataset *ds)
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)
{
@@ -317,6 +317,7 @@ cmd_reread (struct lexer *lexer, struct dataset *ds)
t->column = e;
add_transformation (ds, reread_trns_proc, reread_trns_free, t);
+ fh_unref (fh);
return CMD_SUCCESS;
}
@@ -331,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);
- if (!finite (column) || column < 1)
+ if (!isfinite (column) || column < 1)
{
msg (SE, _("REREAD: Column numbers must be positive finite "
"numbers. Column set to 1."));