Implement GET DATA/TYPE=TXT.
authorBen Pfaff <blp@gnu.org>
Wed, 5 Dec 2007 06:40:12 +0000 (06:40 +0000)
committerBen Pfaff <blp@gnu.org>
Wed, 5 Dec 2007 06:40:12 +0000 (06:40 +0000)
commit2a2e0fe99b3bdf364bff6f0eb7a13ce40be9488c
treeabe67e428983abda905478d37b39e8a12eff062b
parent9ce038d9719d4383a57a0416dc36a905b46d14ec
Implement GET DATA/TYPE=TXT.

* automake.mk: Add new tests.

* command/get-data-txt.sh: New test.

* command/get-data-txt-examples.sh: New test.

* command/get-data-txt-importcases.sh: New test.

* data-parser.c: New file.

* data-parser.h: New file.

* data-list.c (struct dls_var_spec): Removed.
(ll_to_dls_var_spec): Removed.
(enum dls_type): Removed.
(struct data_list_pgm): Rename struct data_list_trns.  Remove
pool, specs, type, record_cnt, delims, skip_records, value_cnt
members.  Add new `parser' member.
(cmd_data_list): Use data-parser infrastructure.
(parse_fixed): Ditto.
(parse_free): Ditto.
(dump_fixed_table): Removed.
(dump_free_table): Removed.
(cut_field): Removed.
(read_from_data_list): Removed.
(read_from_data_list_fixed): Removed.
(read_from_data_list_free): Removed.
(read_from_data_list_list): Removed.
(data_list_trns_free): Rename arguments for clarity.
(data_list_trns_proc): Ditto.
(data_list_casereader_read): Removed.
(data_list_casereader_destroy): Removed.
(data_list_casereader_class): Removed.

* get-data.c (cmd_get_data): Support TXT type.
(set_type): New function.
(parse_get_txt): New function.
13 files changed:
doc/data-io.texi
doc/files.texi
src/language/data-io/ChangeLog
src/language/data-io/automake.mk
src/language/data-io/data-list.c
src/language/data-io/data-parser.c [new file with mode: 0644]
src/language/data-io/data-parser.h [new file with mode: 0644]
src/language/data-io/get-data.c
tests/ChangeLog
tests/automake.mk
tests/command/get-data-txt-examples.sh [new file with mode: 0755]
tests/command/get-data-txt-importcases.sh [new file with mode: 0755]
tests/command/get-data-txt.sh [new file with mode: 0755]