From: Ben Pfaff Date: Sun, 23 Sep 2007 16:49:37 +0000 (+0000) Subject: (cmd_data_list): Don't allow END subcommand to be used with DATA LIST X-Git-Tag: v0.6.0~251 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=commitdiff_plain;h=a1d8ce0ad176357cf250ec065e0bf1a4520a19e3 (cmd_data_list): Don't allow END subcommand to be used with DATA LIST FREE or LIST. --- diff --git a/doc/data-io.texi b/doc/data-io.texi index cb11c7cf..3439ca3a 100644 --- a/doc/data-io.texi +++ b/doc/data-io.texi @@ -339,7 +339,6 @@ DATA LIST FREE [(@{TAB,'c'@}, @dots{})] [@{NOTABLE,TABLE@}] [FILE='file-name'] - [END=end_var] [SKIP=record_cnt] /var_spec@dots{} @@ -369,7 +368,7 @@ of quoting is allowed. The NOTABLE and TABLE subcommands are as in @cmd{DATA LIST FIXED} above. NOTABLE is the default. -The FILE, END, and SKIP subcommands are as in @cmd{DATA LIST FIXED} above. +The FILE and SKIP subcommands are as in @cmd{DATA LIST FIXED} above. The variables to be parsed are given as a single list of variable names. This list must be introduced by a single slash (@samp{/}). The set of @@ -392,7 +391,6 @@ DATA LIST LIST [(@{TAB,'c'@}, @dots{})] [@{NOTABLE,TABLE@}] [FILE='file-name'] - [END=end_var] [SKIP=record_count] /var_spec@dots{} diff --git a/src/language/data-io/ChangeLog b/src/language/data-io/ChangeLog index ec8873ac..ae8bb79f 100644 --- a/src/language/data-io/ChangeLog +++ b/src/language/data-io/ChangeLog @@ -4,6 +4,8 @@ * data-list.c (data_list_trns_proc): Properly set retval when END subcommand is in use. + (cmd_data_list): Don't allow END subcommand to be used with DATA + LIST FREE or LIST. 2007-09-12 Ben Pfaff diff --git a/src/language/data-io/data-list.c b/src/language/data-io/data-list.c index 4e2f083b..75db52af 100644 --- a/src/language/data-io/data-list.c +++ b/src/language/data-io/data-list.c @@ -249,6 +249,12 @@ cmd_data_list (struct lexer *lexer, struct dataset *ds) if (dls->type == -1) dls->type = DLS_FIXED; + if (dls->type != DLS_FIXED && dls->end != NULL) + { + msg (SE, _("The END keyword may be used only with DATA LIST FIXED.")); + goto error; + } + if (table == -1) table = dls->type != DLS_FREE;