X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fautorecode.c;h=fdf3dddc2ea83cec64daff9f394f34c40978b4e6;hb=9ade26c8349b4434008c46cf09bc7473ec743972;hp=ce818cff1169f7e2fd61a15d926942fe405474ca;hpb=c75794cffb05769b71a346af8513a3e8dde55f94;p=pspp-builds.git diff --git a/src/language/stats/autorecode.c b/src/language/stats/autorecode.c index ce818cff..fdf3dddc 100644 --- a/src/language/stats/autorecode.c +++ b/src/language/stats/autorecode.c @@ -113,14 +113,15 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds) /* Parse variable lists. */ lex_match_id (lexer, "VARIABLES"); - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); if (!parse_variables_const (lexer, dict, &src_vars, &n_srcs, PV_NO_DUPLICATE)) goto error; if (!lex_force_match_id (lexer, "INTO")) goto error; - lex_match (lexer, '='); - if (!parse_DATA_LIST_vars (lexer, &dst_names, &n_dsts, PV_NO_DUPLICATE)) + lex_match (lexer, T_EQUALS); + if (!parse_DATA_LIST_vars (lexer, dict, &dst_names, &n_dsts, + PV_NO_DUPLICATE)) goto error; if (n_dsts != n_srcs) { @@ -143,7 +144,7 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds) } /* Parse options. */ - while (lex_match (lexer, '/')) + while (lex_match (lexer, T_SLASH)) { if (lex_match_id (lexer, "DESCENDING")) direction = DESCENDING; @@ -156,7 +157,7 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds) } } - if (lex_token (lexer) != '.') + if (lex_token (lexer) != T_ENDCMD) { lex_error (lexer, _("expecting end of command")); goto error; @@ -294,13 +295,12 @@ arc_free (struct autorecode_pgm *arc) for (i = 0; i < arc->n_specs; i++) { struct arc_spec *spec = &arc->specs[i]; - int width = var_get_width (spec->src); struct arc_item *item, *next; HMAP_FOR_EACH_SAFE (item, next, struct arc_item, hmap_node, spec->items) { - value_destroy (&item->from, width); + value_destroy (&item->from, item->width); hmap_delete (spec->items, &item->hmap_node); free (item); }