Improve the way we handle the various parsing "states". Until now
[pspp-builds.git] / src / language / data-io / ChangeLog
index 256cc20cb0b2628ee1fbfe9eb17f7b91232ab7ab..71aafa44ec8a65d8e9ebc002b9739d34dd560b1a 100644 (file)
@@ -1,3 +1,81 @@
+Wed Apr 26 13:41:05 2006  Ben Pfaff  <blp@gnu.org>
+
+Wed Apr 26 13:16:28 2006  Ben Pfaff  <blp@gnu.org>
+
+       Improve the way we handle the various parsing "states".  Until now
+       we've hard-coded the state transitions in the command definition
+       file, but that's error-prone and, worse, it's redundant--we can
+       figure out what state we're in anyhow.  We can cleanly handle
+       INPUT PROGRAM and FILE TYPE with a nested command-processing loop.
+       
+       * data-list.c: (cmd_data_list) Use in_file_type() or
+       in_input_program() in place of case_source_is_class() or
+       case_source_is_complex().
+
+       * file-type.c: NB: Not really fixed except minimally to compile,
+       because it doesn't work anyway.
+       (in_file_type) New function.
+       (cmd_record_type) No need to check that we're in FILE TYPE.
+       (cmd_end_file_type) Ditto.
+       (var file_type_source_class) Make static.
+
+       * get.c: (cmd_match_files) Check vfm_source instead of pgm_state.
+
+       * inpt-pgm.c: (in_input_program) New function.
+       (cmd_input_program) Rewrite to include nested command processing
+       loop.
+       (cmd_end_input_program) Just return CMD_END_SUBLOOP.
+       (var input_program_source_class) Make static.
+       (cmd_end_case) No need to check that we're in INPUT PROGRAM.
+       (cmd_end_file) Ditto.
+       
+       * automake.mk (src_language_data_io_libdata_io_a_SOURCES): Add
+       file-type.h, inpt-pgm.h.
+
+       * file-type.h: New file.
+
+       * inpt-pgm.h: New file.
+
+Tue Apr 25 13:11:55 2006  Ben Pfaff  <blp@gnu.org>
+
+       * print.c: Don't special-case MS-DOS line terminators.
+       (macro LINE_END_WIDTH) Removed.
+       (alloc_line) Line ends are 1 byte.
+       (print_trns_proc) Just output \n for line end.
+
+Sun Apr 23 22:05:58 2006  Ben Pfaff  <blp@gnu.org>
+
+       Continue reforming error message support.  In this phase, get rid
+       of message "titles" and put the message text in `struct error'.
+       Now `struct error' encapsulates a message more properly.
+       
+       * data-list.c: (macro RPD_ERR) Removed.
+       (rpd_msg) New function.  Updated all references to tmsg() to call
+       this function instead.
+
+Sat Apr 15 19:38:13 2006  Ben Pfaff  <blp@gnu.org>
+
+       Remove last users of struct file_ext so we can get rid of it
+       entirely.
+       
+       * data-reader.c: (struct dfm_reader) Change file member from
+       struct file_ext to FILE *.  Updated all references.
+       (dfm_close_reader) Close file with fn_close() instead of
+       fn_close_ext().  Also, make a copy of the file name from the file
+       handle before closing it, because we can't extract it after we
+       close the file.
+       (dfm_open_reader) Open file with fn_open() instead of
+       fn_open_ext().
+
+       * data-writer.c: (struct dfm_writer) Change file member 
+       struct file_ext to FILE *.  Updated all references.
+       (dfm_close_writer) Close file with fn_close() instead of
+       fn_close_ext().  Also, make a copy of the file name from the file
+       handle before closing it, because we can't extract it after we
+       close the file.
+       (dfm_open_writer) Open file with fn_open() instead of
+       fn_open_ext().
+
 Sat Apr 15 18:00:32 2006  Ben Pfaff  <blp@gnu.org>
 
        * data-list.c: Add prototype to suppress warning for