projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge 'master' into 'psppsheet'.
[pspp]
/
src
/
language
/
dictionary
/
rename-variables.c
diff --git
a/src/language/dictionary/rename-variables.c
b/src/language/dictionary/rename-variables.c
index c1d31996bacfa453b289cfeaa73b1488ceab2bf5..4fc5bada85df3cc3f716bfb816767173660329b2 100644
(file)
--- a/
src/language/dictionary/rename-variables.c
+++ b/
src/language/dictionary/rename-variables.c
@@
-18,8
+18,8
@@
#include <stdlib.h>
#include <stdlib.h>
+#include "data/dataset.h"
#include "data/dictionary.h"
#include "data/dictionary.h"
-#include "data/procedure.h"
#include "data/variable.h"
#include "language/command.h"
#include "language/lexer/lexer.h"
#include "data/variable.h"
#include "language/command.h"
#include "language/lexer/lexer.h"
@@
-53,19
+53,13
@@
cmd_rename_variables (struct lexer *lexer, struct dataset *ds)
size_t prev_nv_1 = rename_cnt;
size_t prev_nv_2 = rename_cnt;
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 (!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))
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;
}
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);
}
while (lex_token (lexer) != T_ENDCMD);