#include "error.h"
#include <stdlib.h>
#include "alloc.h"
+#include "case.h"
#include "command.h"
#include "error.h"
#include "expr.h"
if (compute->test == NULL
|| expr_evaluate (compute->test, c, case_num, NULL) == 1.0)
{
- expr_evaluate (compute->rvalue, c, case_num, &c->data[compute->fv]);
+ expr_evaluate (compute->rvalue, c, case_num,
+ case_data_rw (c, compute->fv));
}
return -1;
return -1;
}
expr_evaluate (compute->rvalue, c, case_num,
- &c->data[compute->vector->var[rindx - 1]->fv]);
+ case_data_rw (c, compute->vector->var[rindx - 1]->fv));
}
return -1;
union value v;
expr_evaluate (compute->rvalue, c, case_num, &v);
- st_bare_pad_len_copy (c->data[compute->fv].s, &v.c[1], compute->width,
- v.c[0]);
+ st_bare_pad_len_copy (case_data_rw (c, compute->fv)->s,
+ &v.c[1], compute->width, v.c[0]);
}
return -1;
expr_evaluate (compute->rvalue, c, case_num, &v);
vr = compute->vector->var[rindx - 1];
- st_bare_pad_len_copy (c->data[vr->fv].s, &v.c[1], vr->width, v.c[0]);
+ st_bare_pad_len_copy (case_data_rw (c, vr->fv)->s,
+ &v.c[1], vr->width, v.c[0]);
}
return -1;
compute = compute_trns_create ();
/* Test expression. */
- compute->test = expr_parse (PXP_BOOLEAN);
+ compute->test = expr_parse (EXPR_BOOLEAN);
if (compute->test == NULL)
goto fail;
assert (type == NUMERIC || type == ALPHA);
- compute->rvalue = expr_parse (type == ALPHA ? PXP_STRING : PXP_NUMERIC);
+ compute->rvalue = expr_parse (type == ALPHA ? EXPR_STRING : EXPR_NUMERIC);
if (compute->rvalue == NULL)
return 0;
lex_get ();
if (!lex_force_match ('('))
goto lossage;
- lvalue->element = expr_parse (PXP_NUMERIC);
+ lvalue->element = expr_parse (EXPR_NUMERIC);
if (lvalue->element == NULL)
goto lossage;
if (!lex_force_match (')'))