X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fexpressions%2Fgenerate.pl;h=188d4eb11cc5c86ef3acfe4d868d4b6a6f4582db;hb=339f1956cc72;hp=1b821c412d57b92882cfe632ffde455f674b074a;hpb=5dbf5abcbed01f04422d4dead1c0ae0bb7efde4f;p=pspp
diff --git a/src/language/expressions/generate.pl b/src/language/expressions/generate.pl
index 1b821c412d..188d4eb11c 100644
--- a/src/language/expressions/generate.pl
+++ b/src/language/expressions/generate.pl
@@ -1,19 +1,19 @@
# PSPP - a program for statistical analysis.
# Copyright (C) 2017 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 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.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-#
+#
use strict;
use warnings 'all';
@@ -561,8 +561,8 @@ sub parse_arg {
$arg{IDX} = force ('id');
if (match ('*')) {
$arg{TIMES} = force ('int');
- die "multiplication factor must be positive"
- if $arg{TIMES} < 1;
+ die "multiplication factor must be two"
+ if $arg{TIMES} != 2;
} else {
$arg{TIMES} = 1;
}
@@ -583,7 +583,7 @@ sub parse_arg {
sub print_header {
print <{ATOM}_arg";
push (@decls, "${ctype}arg_$name = $func (node, $arg_idx)");
} else {
- my ($decl) = "size_t arg_$idx = node->arg_cnt";
+ my ($decl) = "size_t arg_$idx = node->n_args";
$decl .= " - $arg_idx" if $arg_idx;
push (@decls, $decl);
@@ -943,7 +943,7 @@ sub any {
# valid arguments for $op.
sub make_sysmis_decl {
my ($op, $min_valid_src) = @_;
- my (@sysmis_cond);
+ my (@sysmis_cond);
if (!$op->{ABSORB_MISS}) {
for my $arg (@{$op->{ARGS}}) {
my ($arg_name) = "arg_$arg->{NAME}";