projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[pspp]
/
src
/
do-if.c
diff --git
a/src/do-if.c
b/src/do-if.c
index 5dfc0626dfc92932bd9ec24a27216eaa1a8fbab2..1acf84936c0b8b96c1bb16501a7b8dc882b2fa0a 100644
(file)
--- a/
src/do-if.c
+++ b/
src/do-if.c
@@
-14,8
+14,8
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
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., 5
9 Temple Place - Suite 330
, Boston, MA
- 0211
1-1307
, USA. */
+ Foundation, Inc., 5
1 Franklin Street, Fifth Floor
, Boston, MA
+ 0211
0-1301
, USA. */
#include <config.h>
#include "do-ifP.h"
#include <config.h>
#include "do-ifP.h"
@@
-24,16
+24,15
@@
#include "alloc.h"
#include "command.h"
#include "error.h"
#include "alloc.h"
#include "command.h"
#include "error.h"
-#include "expr.h"
+#include "expr
essions/public
.h"
#include "lexer.h"
#include "str.h"
#include "var.h"
#include "lexer.h"
#include "str.h"
#include "var.h"
-#include "debug-print.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
-#if DEBUGGING
-#include <stdio.h>
-#endif
+#include "debug-print.h"
/* *INDENT-OFF* */
/* Description of DO IF transformations:
/* *INDENT-OFF* */
/* Description of DO IF transformations:
@@
-248,7
+247,7
@@
parse_do_if (void)
struct do_if_trns *t;
struct expression *e;
struct do_if_trns *t;
struct expression *e;
- e = expr_parse (
PXP
_BOOLEAN);
+ e = expr_parse (
default_dict, EXPR
_BOOLEAN);
if (!e)
return NULL;
if (token != '.')
if (!e)
return NULL;
if (token != '.')
@@
-280,15
+279,15
@@
do_if_trns_proc (struct trns_header * trns, struct ccase * c,
int case_num UNUSED)
{
struct do_if_trns *t = (struct do_if_trns *) trns;
int case_num UNUSED)
{
struct do_if_trns *t = (struct do_if_trns *) trns;
-
union value bool
;
+
double boolean
;
-
expr_evaluate (t->cond, c, case_num, &bool
);
- if (bool
.f
== 1.0)
+
boolean = expr_evaluate_num (t->cond, c, case_num
);
+ if (bool
ean
== 1.0)
{
debug_printf ((_("DO IF %d: true\n"), t->h.index));
return -1;
}
{
debug_printf ((_("DO IF %d: true\n"), t->h.index));
return -1;
}
- else if (bool
.f
== 0.0)
+ else if (bool
ean
== 0.0)
{
debug_printf ((_("DO IF %d: false\n"), t->h.index));
return t->false_jump;
{
debug_printf ((_("DO IF %d: false\n"), t->h.index));
return t->false_jump;