Estimate parameters. Moved some code to re-usable functions.
[pspp-builds.git] / src / language / data-io / ChangeLog
index 099c4c5e0717e8d77c4a7464bf8067ca5992420c..1eda1c0595f463d39ae26d77068fc6760c8c5c9b 100644 (file)
@@ -1,3 +1,294 @@
+2008-05-15  Ben Pfaff  <blp@gnu.org>
+
+       Patch #6512.
+
+       * inpt-pgm.c (reread_trns_proc): Use gsl_finite instead of finite,
+       as a stopgap measure for portability until appropriate gnulib
+       modules are available.
+
+2008-02-06 John Darrington <john@darrington.wattle.id.au>
+
+       * get-data.c: Add a /BSIZE subcommand to PSQL reader.
+
+2008-02-02 John Darrington <john@darrington.wattle.id.au>
+
+       * get-data.c (cmd_get_data): Support PSQL type.
+
+2007-12-07  Ben Pfaff  <blp@gnu.org>
+
+       Patch #6302.
+
+       * data-parser.c (data_parser_make_active_file): Fix case count
+       argument to casereader_create_sequential, which fixes data reading
+       in the GUI.
+       Provided by John Darrington.
+
+2007-12-04  Ben Pfaff  <blp@gnu.org>
+
+       Move DATA LIST parsing into generic infrastructure, and generalize
+       it slightly.  Then, use the same infrastructure to implement GET
+       DATA/TYPE=TXT.
+
+       * 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.
+
+2007-12-04  Ben Pfaff  <blp@gnu.org>
+
+       * placement-parser.c (parse_column): New function.
+       (parse_column_range): Add `base' argument.  Update all callers.
+       
+2007-12-04  Ben Pfaff  <blp@gnu.org>
+
+       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  <blp@gnu.org>
+
+       * src/language/data-io/data-reader.c (struct dfm_reader): New
+       `file_size' member to support dfm_get_percent_read.
+       (dfm_open_reader): Initialize file_size.
+       (dfm_get_percent_read): New function.
+
+2007-11-08  Ben Pfaff  <blp@gnu.org>
+
+       Patch #6256: add support for binary, 360 file formats.  Reviewed
+       by John Darrington.
+
+       * data-reader.c (struct dfm_reader): New member `block_left'.
+       (dfm_open_reader): Initialize block_left.  For FH_MODE_TEXT, open
+       the file in text mode.
+       (read_error): New function.
+       (partial_record): New function.
+       (try_to_read_fully): New function.
+       (enum descriptor_type): New enum.
+       (read_descriptor_word): New function.
+       (corrupt_size): New function.
+       (read_size): New function.
+       (read_file_record): Implement new modes.
+       (read_record): Now take care of tracking line numbers here.
+       (dfm_reader_get_legacy_encoding): New function.
+
+       * data-writer.c (dfm_put_record): Implement new modes.
+       (dfm_writer_get_legacy_encoding): New function.
+
+       * file-handle.q: Parse new formats.
+       (cmd_file_handle): Set up new formats.
+
+       * print.c (struct print_trns): New member `encoding'.
+       (internal_cmd_print): Set encoding.
+       (print_trns_proc): Recode output data if necessary.
+       (flush_records): Recode leader byte.
+
+2007-11-03  Ben Pfaff  <blp@gnu.org>
+
+       Allow output files to overwrite input files (bug #21280).
+
+       * data-list.c (cmd_data_list): Manage file handle reference
+       counts.
+
+       * data-reader.c (struct dfm_reader): Add `lock' member.
+       (dfm_close_reader): Simplify, as reference counting is now
+       separate from locking.
+       (dfm_open_reader): Lock file.
+
+       * data-writer.c (struct dfm_writer): Add fh_lock, replace_file
+       members.
+       (dfm_open_writer): Lock file and prepare for replacement.
+       (dfm_close_writer): Unlock file and replace it.
+
+       * file-handle.q (cmd_close_file_handle): Use fh_unname.
+       (fh_parse): Don't distinguish existing handles for a given file
+       name from new ones.  Manage file handle reference counts.
+
+       * get.c (parse_read_command): Manage file handle reference counts.
+       (parse_write_command): Ditto.
+       (mtf_close_all_files): Ditto.
+
+       * inpt-pgm.c (cmd_reread): Manage file handle reference counts.
+
+       * print-space.c (cmd_print_space): Manage file handle reference
+       counts.
+
+       * print.c (internal_cmd_print): Manage file handle reference
+       counts.
+
+2007-11-03 John Darrington <john@darrington.wattle.id.au>
+
+       * get.c: Add GET DATA command variant.
+
+       * get-data.c get-data.h (new files): Added support for
+        GET DATA /TYPE='gnm'  command.
+
+2007-09-23  Ben Pfaff  <blp@gnu.org>
+
+       Bug #21111.  Reviewed by John Darrington.
+
+       * 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  <blp@gnu.org>
+
+       * get.c (get_translate_case): Change input case parameter from
+       const struct ccase * to struct ccase *, to match change in
+       casereader and casewriter translators.  Destroy input case, to fix
+       memory leak.
+
+2007-08-12  Ben Pfaff  <blp@gnu.org>
+
+       * get.c (parse_read_command): Compact the values in the target
+       dictionary, to save space.
+
+2007-08-12  Ben Pfaff  <blp@gnu.org>
+
+       * get.c (struct case_map): Move into new file src/data/case-map.c.
+       (start_case_map): Ditto, and rename case_map_prepare_dict.
+       (finish_case_map): Ditto, and rename case_map_from_dict.
+       (map_case): Ditto, and rename case_map_execute.
+       (destroy_case_map): Ditto, and rename case_map_destroy.
+       (case_map_get_value_cnt): Ditto.
+
+2007-08-12  Ben Pfaff  <blp@gnu.org>
+
+       * get.c (case_map_get_value_cnt): New function.
+
+2007-07-25  Ben Pfaff  <blp@gnu.org>
+
+       Fix bug #17100.
+       * data-list.c (read_from_data_list_fixed): Handle multi-record
+       DATA LIST correctly.
+
+2007-07-11  Ben Pfaff  <blp@gnu.org>
+
+       * get.c (map_case): Create destination case instead of leaving it
+       undefined.  Fixes bug #20285.
+       Reviewed by John Darrington.
+
+2007-06-06  Ben Pfaff  <blp@gnu.org>
+
+       * get.c: Essentially rewrite MATCH FILES to support FIRST and
+       LAST.
+
+2007-06-06  Ben Pfaff  <blp@gnu.org>
+
+       Adapt case sources, sinks, and clients of procedure code to the
+       new infrastructure.
+       
+       * data-list.c: Make DATA LIST into a casereader.
+
+       * get.c: Change GET, IMPORT, SAVE, EXPORT to use casereaders,
+       casewriters.
+
+       * inpt-pgm.c: Use caseinit code.  Turn INPUT PROGRAM into a
+       casereader.
+
+       * list.q: Adapt to new procedure code.
+
+2007-05-06  Ben Pfaff  <blp@gnu.org>
+
+       Abstract the documents within a dictionary a little better.
+       Thanks to John Darrington for suggestion, initial version, and
+       review.  Patch #5917.
+
+       * get.c (mtf_merge_dictionary): Simplify creating merged document.
+
+       * sys-file-info.c (display_documents): Use new
+       dict_get_document_line_cnt and dict_get_document_line functions.
+
+Thu Feb  1 16:56:02 2007  Ben Pfaff  <blp@gnu.org>
+
+       * file-handle.q (fh_parse): Update to new fh_create_file
+       prototype.
+
+Sat Dec 16 22:16:18 2006  Ben Pfaff  <blp@gnu.org>
+
+       Make it possible to pull cases from the active file with a
+       function call, instead of requiring indirection through a callback
+       function.
+
+       * automake.mk: Removed matrix-data.c.
+
+       * matrix-data.c: Removed.
+
+       * data-list.c (data_list_source_read): Conform with new
+       case_source_class interface.
+       (data_list_source_destroy): Ditto.
+
+       * get.c (case_reader_source_class): Ditto.
+       (case_reader_source_destroy): Ditto.
+       (parse_output_proc): Take advantage of new procedure interface.
+       (output_proc): Removed.
+       (struct mtf_file): Add "struct ccase *" member to allow use of new
+       procedure interface.
+       (cmd_match_files): Take advantage of new procedure interface.
+       (mtf_processing_finish): Removed.
+       (mtf_read_nonactive_records): Renamed mtf_read_records.  Now reads
+       from every file, without any exception for the active file.
+       (mtf_compare_BY_values): Simplify for new interface.
+       (mtf_processing): Simplify for new interface.
+
+       * inpt-pgm.c (is_valid_state): New function.
+       (input_program_source_read): Conform with new case_source_class
+       interface.
+       (input_program_source_destroy): Ditto.
+       (end_case_trns_proc): Now just needs to return TRNS_END_CASE.
+
+Sat Dec  9 18:43:34 2006  Ben Pfaff  <blp@gnu.org>
+
+       * list.q (cmd_list): Use new var_create, var_destroy functions.
+
+Thu Nov 30 21:51:58 2006  Ben Pfaff  <blp@gnu.org>
+
+       * inpt-pgm.c (cmd_reread): Always return error code upon detecting
+       syntax error.  Fixes bug #18419.  Thanks to John Darrington for
+       reporting this bug.
+
+Sun Nov 19 09:17:45 2006  Ben Pfaff  <blp@gnu.org>
+
+       * data-list.c (parse_free): Follow documented (but odd) rule that
+       N format is treated as F format for free-field input.
+       
+       * data-reader.c (read_file_record): Drop new-line character from
+       input text lines.  This is symmetrical with the recently changed
+       dfm_put_record semantics.
+
 Thu Nov  2 20:56:03 2006  Ben Pfaff  <blp@gnu.org>
 
        Implement SKIP keyword on DATA LIST.  Fixes bug #17099.