projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Encapsulated lexer and updated calling functions accordingly.
[pspp]
/
src
/
language
/
dictionary
/
split-file.c
diff --git
a/src/language/dictionary/split-file.c
b/src/language/dictionary/split-file.c
index 8c5a955571dd0f07ff9b6937eb5daf763c512944..0f648e530399b8cd0109ab3ca88413d4a9fcd2f7 100644
(file)
--- a/
src/language/dictionary/split-file.c
+++ b/
src/language/dictionary/split-file.c
@@
-42,9
+42,9
@@
#define _(msgid) gettext (msgid)
int
#define _(msgid) gettext (msgid)
int
-cmd_split_file (struct dataset *ds)
+cmd_split_file (struct
lexer *lexer, struct
dataset *ds)
{
{
- if (lex_match_id ("OFF"))
+ if (lex_match_id (
lexer,
"OFF"))
dict_set_split_vars (dataset_dict (ds), NULL, 0);
else
{
dict_set_split_vars (dataset_dict (ds), NULL, 0);
else
{
@@
-52,17
+52,17
@@
cmd_split_file (struct dataset *ds)
size_t n;
/* For now, ignore SEPARATE and LAYERED. */
size_t n;
/* For now, ignore SEPARATE and LAYERED. */
- (void) ( lex_match_id (
"SEPARATE") || lex_match_id (
"LAYERED") );
+ (void) ( lex_match_id (
lexer, "SEPARATE") || lex_match_id (lexer,
"LAYERED") );
- lex_match (T_BY);
- if (!parse_variables (dataset_dict (ds), &v, &n, PV_NO_DUPLICATE))
+ lex_match (
lexer,
T_BY);
+ if (!parse_variables (
lexer,
dataset_dict (ds), &v, &n, PV_NO_DUPLICATE))
return CMD_CASCADING_FAILURE;
dict_set_split_vars (dataset_dict (ds), v, n);
free (v);
}
return CMD_CASCADING_FAILURE;
dict_set_split_vars (dataset_dict (ds), v, n);
free (v);
}
- return lex_end_of_command ();
+ return lex_end_of_command (
lexer
);
}
/* Dumps out the values of all the split variables for the case C. */
}
/* Dumps out the values of all the split variables for the case C. */