From: Ben Pfaff Date: Wed, 5 Dec 2007 06:22:45 +0000 (+0000) Subject: Make GET DATA a separate command, instead of something invoked X-Git-Tag: v0.6.0~173 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b51bc9ca536e41bea78ffdb2d6b9b4935dddf82e;p=pspp-builds.git Make GET DATA a separate command, instead of something invoked indirectly from GET. * automake.mk: Remove get-data.h from sources. * get-data.h: Removed. * get-data.c (parse_get_data_command): Rename cmd_get_data. * get.c (parse_read_command): No longer any need to check for DATA keyword. * command.def: Add GET DATA command. --- diff --git a/src/language/ChangeLog b/src/language/ChangeLog index 65b97e6b..506c90a0 100644 --- a/src/language/ChangeLog +++ b/src/language/ChangeLog @@ -1,3 +1,7 @@ +2007-12-04 Ben Pfaff + + * command.def: Add GET DATA command. + 2007-11-05 Ben Pfaff Patch #6258. Reviewed by John Darrington. diff --git a/src/language/command.def b/src/language/command.def index f77bd692..7f89fee5 100644 --- a/src/language/command.def +++ b/src/language/command.def @@ -42,6 +42,7 @@ DEF_CMD (S_ANY, F_KEEP_FINAL_TOKEN, "TITLE", cmd_title) /* Commands that define (or replace) the active file. */ DEF_CMD (S_INITIAL | S_DATA | S_INPUT_PROGRAM | S_FILE_TYPE, 0, "DATA LIST", cmd_data_list) DEF_CMD (S_INITIAL | S_DATA, 0, "GET", cmd_get) +DEF_CMD (S_INITIAL | S_DATA, 0, "GET DATA", cmd_get_data) DEF_CMD (S_INITIAL | S_DATA, 0, "IMPORT", cmd_import) DEF_CMD (S_INITIAL | S_DATA, 0, "INPUT PROGRAM", cmd_input_program) diff --git a/src/language/data-io/ChangeLog b/src/language/data-io/ChangeLog index ed22c9a4..f18ea50a 100644 --- a/src/language/data-io/ChangeLog +++ b/src/language/data-io/ChangeLog @@ -1,3 +1,17 @@ +2007-12-04 Ben Pfaff + + Make GET DATA a separate command, instead of something invoked + indirectly from GET. + + * automake.mk: Remove get-data.h from sources. + + * get-data.h: Removed. + + * get-data.c (parse_get_data_command): Rename cmd_get_data. + + * get.c (parse_read_command): No longer any need to check for DATA + keyword. + 2007-12-04 Ben Pfaff * src/language/data-io/data-reader.c (struct dfm_reader): New diff --git a/src/language/data-io/automake.mk b/src/language/data-io/automake.mk index dced683b..6711f6c6 100644 --- a/src/language/data-io/automake.mk +++ b/src/language/data-io/automake.mk @@ -8,7 +8,6 @@ language_data_io_sources = \ src/language/data-io/data-list.c \ src/language/data-io/get.c \ src/language/data-io/get-data.c \ - src/language/data-io/get-data.h \ src/language/data-io/inpt-pgm.c \ src/language/data-io/inpt-pgm.h \ src/language/data-io/print.c \ diff --git a/src/language/data-io/get-data.c b/src/language/data-io/get-data.c index 015815a9..36ea2e7a 100644 --- a/src/language/data-io/get-data.c +++ b/src/language/data-io/get-data.c @@ -16,7 +16,6 @@ #include -#include "get-data.h" #include #include @@ -33,7 +32,7 @@ static int parse_get_gnm (struct lexer *lexer, struct dataset *); int -parse_get_data_command (struct lexer *lexer, struct dataset *ds) +cmd_get_data (struct lexer *lexer, struct dataset *ds) { lex_force_match (lexer, '/'); diff --git a/src/language/data-io/get-data.h b/src/language/data-io/get-data.h deleted file mode 100644 index 4d9c44ed..00000000 --- a/src/language/data-io/get-data.h +++ /dev/null @@ -1,26 +0,0 @@ -/* PSPP - a program for statistical analysis. - Copyright (C) 2007 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef GET_DATA_H -#define GET_DATA_H - -struct lexer; -struct dataset; - -int parse_get_data_command (struct lexer *lexer, struct dataset *ds); - - -#endif diff --git a/src/language/data-io/get.c b/src/language/data-io/get.c index ed490ced..f8a84b14 100644 --- a/src/language/data-io/get.c +++ b/src/language/data-io/get.c @@ -45,8 +45,6 @@ #include #include -#include "get-data.h" - #include "xalloc.h" #include "gettext.h" @@ -75,11 +73,6 @@ parse_read_command (struct lexer *lexer, struct dataset *ds, enum reader_command struct dictionary *dict = NULL; struct case_map *map = NULL; - if ( type == GET_CMD && lex_match_id (lexer, "DATA") ) - { - return parse_get_data_command (lexer, ds); - } - for (;;) { lex_match (lexer, '/');