X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Frename-variables.c;h=f7cd9c1a613ad3f7a4ccc1078dea9a37ff034ee7;hb=9021515cfa1489f9cd37e7440807bdd1d40de37a;hp=82fc1d96c8117a1c6823c4a4a8be057570a2d3a0;hpb=2be9bee9da6a2ce27715e58128569594319abfa2;p=pspp diff --git a/src/language/dictionary/rename-variables.c b/src/language/dictionary/rename-variables.c index 82fc1d96c8..f7cd9c1a61 100644 --- a/src/language/dictionary/rename-variables.c +++ b/src/language/dictionary/rename-variables.c @@ -45,27 +45,21 @@ cmd_rename_variables (struct lexer *lexer, struct dataset *ds) int status = CMD_CASCADING_FAILURE; if (proc_make_temporary_transformations_permanent (ds)) - msg (SE, _("RENAME VARS may not be used after TEMPORARY. " - "Temporary transformations will be made permanent.")); + msg (SE, _("%s may not be used after %s. " + "Temporary transformations will be made permanent."), "RENAME VARS", "TEMPORARY"); do { size_t prev_nv_1 = rename_cnt; size_t prev_nv_2 = rename_cnt; - if (!lex_match (lexer, T_LPAREN)) - { - msg (SE, _("`(' expected.")); - goto lossage; - } + if (!lex_force_match (lexer, T_LPAREN)) + goto lossage; if (!parse_variables (lexer, dataset_dict (ds), &rename_vars, &rename_cnt, PV_APPEND | PV_NO_DUPLICATE)) goto lossage; - if (!lex_match (lexer, T_EQUALS)) - { - msg (SE, _("`=' expected between lists of new and old variable names.")); - goto lossage; - } + if (!lex_force_match (lexer, T_EQUALS)) + goto lossage; if (!parse_DATA_LIST_vars (lexer, dataset_dict (ds), &rename_new_names, &prev_nv_1, PV_APPEND | PV_NO_DUPLICATE)) @@ -83,11 +77,8 @@ cmd_rename_variables (struct lexer *lexer, struct dataset *ds) rename_new_names = NULL; goto lossage; } - if (!lex_match (lexer, T_RPAREN)) - { - msg (SE, _("`)' expected after variable names.")); - goto lossage; - } + if (!lex_force_match (lexer, T_RPAREN)) + goto lossage; } while (lex_token (lexer) != T_ENDCMD);