X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fcontrol%2Floop.c;h=40a33c11bbafc451adddb40f9529356ed12c6776;hb=1fe087cbcce6a9eb41928b7af6b58c7a2aac47f8;hp=5a2417131e49dd3b7ff1a24d2dd90da7b5a9071e;hpb=f5c108becd49d78f4898cab11352291f5689d24e;p=pspp
diff --git a/src/language/control/loop.c b/src/language/control/loop.c
index 5a2417131e..40a33c11bb 100644
--- a/src/language/control/loop.c
+++ b/src/language/control/loop.c
@@ -1,24 +1,23 @@
-/* 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
#include "control-stack.h"
+
#include
#include
#include
@@ -28,13 +27,14 @@
#include
#include
#include
-#include
#include
#include
#include
#include
#include
+#include "xalloc.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
@@ -181,7 +181,7 @@ close_loop (void *loop_)
&& loop->index_var == NULL
&& loop->loop_condition == NULL
&& loop->end_loop_condition == NULL)
- loop->max_pass_count = get_mxloops ();
+ loop->max_pass_count = settings_get_mxloops ();
}
/* Parses an IF clause for LOOP or END LOOP and stores the
@@ -321,7 +321,8 @@ loop_trns_proc (void *loop_, struct ccase *c, casenumber case_num)
case_data_rw (c, loop->index_var)->f = loop->cur;
/* Throw out pathological cases. */
- if (!finite (loop->cur) || !finite (loop->by) || !finite (loop->last)
+ if (!isfinite (loop->cur) || !isfinite (loop->by)
+ || !isfinite (loop->last)
|| loop->by == 0.0
|| (loop->by > 0.0 && loop->cur > loop->last)
|| (loop->by < 0.0 && loop->cur < loop->last))