projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Encapsulated the static data of procedure.[ch] into a single object, to be
[pspp-builds.git]
/
src
/
language
/
xforms
/
compute.c
diff --git
a/src/language/xforms/compute.c
b/src/language/xforms/compute.c
index f24ecac591cbb2340086963f961174852561708d..c4ea4c5a4db266958b2f20bfb78a1049f6c0f26a 100644
(file)
--- a/
src/language/xforms/compute.c
+++ b/
src/language/xforms/compute.c
@@
-94,7
+94,8
@@
cmd_compute (void)
if (compute->rvalue == NULL)
goto fail;
if (compute->rvalue == NULL)
goto fail;
- add_transformation (get_proc_func (lvalue), compute_trns_free, compute);
+ add_transformation (current_dataset,
+ get_proc_func (lvalue), compute_trns_free, compute);
lvalue_finalize (lvalue, compute);
lvalue_finalize (lvalue, compute);
@@
-219,7
+220,7
@@
cmd_if (void)
compute = compute_trns_create ();
/* Test expression. */
compute = compute_trns_create ();
/* Test expression. */
- compute->test = expr_parse (d
efault_dict
, EXPR_BOOLEAN);
+ compute->test = expr_parse (d
ataset_dict (current_dataset)
, EXPR_BOOLEAN);
if (compute->test == NULL)
goto fail;
if (compute->test == NULL)
goto fail;
@@
-235,7
+236,8
@@
cmd_if (void)
if (compute->rvalue == NULL)
goto fail;
if (compute->rvalue == NULL)
goto fail;
- add_transformation (get_proc_func (lvalue), compute_trns_free, compute);
+ add_transformation (current_dataset,
+ get_proc_func (lvalue), compute_trns_free, compute);
lvalue_finalize (lvalue, compute);
lvalue_finalize (lvalue, compute);
@@
-267,7
+269,7
@@
parse_rvalue (const struct lvalue *lvalue)
{
bool is_numeric = lvalue_get_type (lvalue) == NUMERIC;
{
bool is_numeric = lvalue_get_type (lvalue) == NUMERIC;
- return expr_parse (d
efault_dict
, is_numeric ? EXPR_NUMBER : EXPR_STRING);
+ return expr_parse (d
ataset_dict (current_dataset)
, is_numeric ? EXPR_NUMBER : EXPR_STRING);
}
/* Returns a new struct compute_trns after initializing its fields. */
}
/* Returns a new struct compute_trns after initializing its fields. */
@@
-325,7
+327,7
@@
lvalue_parse (void)
if (lex_look_ahead () == '(')
{
/* Vector. */
if (lex_look_ahead () == '(')
{
/* Vector. */
- lvalue->vector = dict_lookup_vector (d
efault_dict
, tokid);
+ lvalue->vector = dict_lookup_vector (d
ataset_dict (current_dataset)
, tokid);
if (lvalue->vector == NULL)
{
msg (SE, _("There is no vector named %s."), tokid);
if (lvalue->vector == NULL)
{
msg (SE, _("There is no vector named %s."), tokid);
@@
-336,7
+338,7
@@
lvalue_parse (void)
lex_get ();
if (!lex_force_match ('('))
goto lossage;
lex_get ();
if (!lex_force_match ('('))
goto lossage;
- lvalue->element = expr_parse (d
efault_dict
, EXPR_NUMBER);
+ lvalue->element = expr_parse (d
ataset_dict (current_dataset)
, EXPR_NUMBER);
if (lvalue->element == NULL)
goto lossage;
if (!lex_force_match (')'))
if (lvalue->element == NULL)
goto lossage;
if (!lex_force_match (')'))
@@
-362,7
+364,7
@@
lvalue_get_type (const struct lvalue *lvalue)
{
if (lvalue->vector == NULL)
{
{
if (lvalue->vector == NULL)
{
- struct variable *var = dict_lookup_var (d
efault_dict
, lvalue->var_name);
+ struct variable *var = dict_lookup_var (d
ataset_dict (current_dataset)
, lvalue->var_name);
if (var == NULL)
return NUMERIC;
else
if (var == NULL)
return NUMERIC;
else
@@
-386,9
+388,9
@@
lvalue_finalize (struct lvalue *lvalue, struct compute_trns *compute)
{
if (lvalue->vector == NULL)
{
{
if (lvalue->vector == NULL)
{
- compute->variable = dict_lookup_var (d
efault_dict
, lvalue->var_name);
+ compute->variable = dict_lookup_var (d
ataset_dict (current_dataset)
, lvalue->var_name);
if (compute->variable == NULL)
if (compute->variable == NULL)
- compute->variable = dict_create_var_assert (d
efault_dict
,
+ compute->variable = dict_create_var_assert (d
ataset_dict (current_dataset)
,
lvalue->var_name, 0);
compute->fv = compute->variable->fv;
lvalue->var_name, 0);
compute->fv = compute->variable->fv;