* src/language/data-io/data-reader.c (struct dfm_reader): New
[pspp-builds.git] / src / language / data-io / ChangeLog
index a0a4da027f8af51329129c4ed98149dcf2630c37..ed22c9a4d414ca12f2e2780431945045763088ca 100644 (file)
@@ -1,3 +1,162 @@
+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