X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Ftrim.c;h=947a7524a84eaa9d00773d9ff8af440b49910351;hb=93b3c24f9c9eef7e4a9ff2fca02731e94c3809de;hp=ac8bf272f8528f2ebc5878e0ce0c64d8e4a1c9e3;hpb=81579d9e9f994fb2908f50af41c3eb033d216e58;p=pspp diff --git a/src/language/data-io/trim.c b/src/language/data-io/trim.c index ac8bf272f8..947a7524a8 100644 --- a/src/language/data-io/trim.c +++ b/src/language/data-io/trim.c @@ -81,7 +81,8 @@ parse_dict_rename (struct lexer *lexer, struct dictionary *dict) if (v == NULL) return 0; if (!lex_force_match (lexer, T_EQUALS) - || !lex_force_id (lexer)) + || !lex_force_id (lexer) + || !dict_id_is_valid (dict, lex_tokcstr (lexer), true)) return 0; if (dict_lookup_var (dict, lex_tokcstr (lexer)) != NULL) { @@ -111,10 +112,10 @@ parse_dict_rename (struct lexer *lexer, struct dictionary *dict) goto done; if (!lex_match (lexer, T_EQUALS)) { - msg (SE, _("`=' expected after variable list.")); + lex_error_expecting (lexer, "`='", NULL_SENTINEL); goto done; } - if (!parse_DATA_LIST_vars (lexer, &new_names, &nn, + if (!parse_DATA_LIST_vars (lexer, dict, &new_names, &nn, PV_APPEND | PV_NO_SCRATCH | PV_NO_DUPLICATE)) goto done; if (nn != nv)