d78105b8b53d8caa065eba6eb6b08ee7bd1a0411
[pspp-builds.git] / src / language / data-io / ChangeLog
1 Sat Jul  1 17:39:40 2006  Ben Pfaff  <blp@gnu.org>
2
3         Fix bug #11612, "q2c documentation does not agree with code".
4         
5         * list.q: Audit use of q2c "+" prefixes that indicate that a
6         command may appear multiple times.
7
8 Sat Jul  1 20:44:22 2006  Ben Pfaff  <blp@gnu.org>
9
10         Fix bug #15786: System File Creation crashes if directoy is
11         nonexistent.
12         
13         * get.c (parse_write_command): Check that the any_writer open
14         succeeds.
15
16 Tue Jun 27 22:44:28 2006  Ben Pfaff  <blp@gnu.org>
17
18         Fix regression in command name completion reported by John
19         Darrington.  Now completion is again state-dependent and occurs
20         only on the first line of a command.
21         
22         * inpt-pgm.c: (cmd_input_program) Reading of first token in
23         command moved into cmd_parse.
24
25 Fri Jun  9 13:56:00 2006  Ben Pfaff  <blp@gnu.org>
26
27         Reform string library.
28         
29         * matrix-data.c (context): Use dynamic string.
30         (another_token) Deal with changed dfm_get_record() interface.
31         (mget_token) Ditto.
32         (force_eol) Ditto.
33
34         * data-list.c (struct data_list_pgm) Delete delims, delim_cnt
35         members, replacing them by struct string delims.  Update all
36         references to use struct string functions.
37         (cut_field) Change interface to avoid needing "end_blank", by
38         getting the data-reader to remember that state for us.  Change
39         internals to use substring.  Update both callers.
40
41         * data-reader.c (read_file_record): Use ds_read_stream().
42         (dfm_get_record) Change interface to return substring.  Updated
43         all callers.
44         (dfm_expand_tabs) Use ds_find_char().  Now maintain position
45         relative to end-of-line.  Use ds_swap().
46         (dfm_reread_record) Don't limit position by line length.
47         (dfm_column_start) Make parameter const.
48         (dfm_columns_past_end) New function.
49         (dfm_get_column) New function.
50
51 Thu May 25 18:26:26 WST 2006 John Darrington <john@darrington.wattle.id.au>
52
53         * print.c (print_trns_free): Made the code agree with the comment, by
54         not freeing PRT.  Has the side effect that the command no longer
55         crashes on invalid syntax.
56
57 Tue May  9 20:55:46 2006  Ben Pfaff  <blp@gnu.org>
58
59         * get.c (cmd_match_files): Fix memory leak replacing default_dict.
60
61 Sat May  6 22:25:09 2006  Ben Pfaff  <blp@gnu.org>
62
63         Fix segfault.
64         
65         * list.q (write_fallback_headers): (write_fallback_headers)
66         Properly record width of leader and pass it to write_varname().
67
68 Sat May  6 19:03:13 2006  Ben Pfaff  <blp@gnu.org>
69
70         * get.c: (mtf_merge_dictionary) Fix value label memory leak.
71
72 Sat May  6 13:51:16 2006  Ben Pfaff  <blp@gnu.org>
73
74         Use a casefile, instead of a case sink, for MATCH FILES output.
75         It's more straightforward, although it has the same effect.
76         
77         * get.c: (struct mtf_proc) Replace `sink' case sink member by
78         `output' casefile member.
79         (cmd_match_files) Work with casefile instead of sink.
80         (mtf_processing) Add case to casefile instead of sink.
81
82 Sat May  6 10:43:07 2006  Ben Pfaff  <blp@gnu.org>
83
84         Continue reforming procedure execution.  In this phase, get rid of
85         the output code for SPLIT FILE groups in procedure.c, which really
86         shouldn't be doing any output.  Move it into the individual
87         procedures instead.  This also adds some flexibility.
88
89         * list.q (write_all_headers): Call output_split_file_values().
90
91 Wed May  3 23:00:17 2006  Ben Pfaff  <blp@gnu.org>
92
93         Continue reforming procedure execution.  In this phase, get rid of
94         many global variables, consolidating procedure execution in
95         procedure.c.  Encapsulate transformations in new "struct
96         trns_chain".  Also, change implementation of N OF CASES, FILTER,
97         and PROCESS IF from special cases to transformations.
98          
99         * data-list.c: (data_list_trns_proc) Return TRNS_END_FILE at end
100         of file.  (Why didn't we do this before?)
101         (cmd_match_files) Direct procedure output to null sink.
102         Use discard_variables() instead of indirect version.
103
104         * inpt-pgm.c: Use transformation chain.
105         (struct input_program_pgm) Add trns_chain member.
106         (cmd_input_program) Initialize trns_chain member and capture
107         transformations with proc_capture_transformations().
108         (input_program_source_read) Use trns_chain_execute().
109         (destroy_input_program) Destroy input chain.
110
111 Tue May  2 10:39:56 WST 2006 John Darrington <john@darrington.wattle.id.au>
112
113         * list.q Changed from using fixed length char buffers to struct 
114         string so that any length variables can be used.
115
116 Mon May  1 18:21:19 2006  Ben Pfaff  <blp@gnu.org>
117
118         Further clean up the CMD_* command result codes.
119         
120         * (enum cmd_result_extensions) New.  Add CMD_END_INPUT_PROGRAM and
121         CMD_END_CASE result codes.
122         (struct input_program_pgm) Added case_nr, write_case, wc_data
123         members for use by END CASE transformation.
124         (emit_END_CASE) New function.
125         (cmd_input_program) Interpret CMD_END_CASE by outputting an END
126         CASE transformation.  If none is output by the input program
127         itself, add one automatically at the end.  Change lack of
128         variables from warning to error.
129         (cmd_end_input_program) Return CMD_END_INPUT_PROGRAM instead of
130         CMD_END_SUBLOOP.
131         (input_program_source_read) No longer any need to special-case END
132         CASE.  Handle TRNS_DROP_CASE properly.  Initialize new members in
133         inp for use by END CASE transformation.
134         (destroy_input_program) New function.
135         (input_program_source_destroy) Just call destroy_input_program().
136         (cmd_end_case) Just return CMD_END_CASE.
137         (end_case_trns_proc) No longer a stub handled by
138         input_program_source_read().  Actually output the case and
139         increment the case number.
140
141 Mon May  1 16:06:30 2006  Ben Pfaff  <blp@gnu.org>
142
143         Remove vestiges of REPEATING DATA support.
144         
145         * data-list.c: (struct rpd_num_or_var) Removed.
146         (struct repeating_data_trns) Removed.
147         (cmd_repeating_data) Removed.
148         (find_variable_input_spec) Removed.
149         (parse_num_or_var) Removed.
150         (parse_repeating_data) Removed.
151         (realize_value) Removed.
152         (struct rpd_parse_info) Removed.
153         (rpd_parse_record) Removed.
154         (repeating_data_trns_proc) Removed.
155         (repeating_data_trns_free) Removed.
156         (repeating_data_set_write_case) Removed.
157         (rpd_msg) Removed.
158
159         * inpt-pgm.c: (input_program_source_read) Don't deal with
160         REPEATING DATA.
161
162         * data-list.h: Removed.
163
164         * automake.mk (src_language_data_io_libdata_io_a_SOURCES): Removed
165         data-list.h.
166
167 Mon May  1 15:58:28 2006  Ben Pfaff  <blp@gnu.org>
168
169         Remove vestiges of FILE TYPE support. 
170         
171         * data-list.c: (cmd_data_list) Don't check for FILE TYPE.
172         (cmd_repeating_data) Ditto.
173         
174         * automake.mk (src_language_data_io_libdata_io_a_SOURCES): Remove
175         file-type.c, file-type.h.
176
177         * file-type.c: Removed.
178         
179         * file-type.h: Removed.
180
181 Wed Apr 26 13:16:28 2006  Ben Pfaff  <blp@gnu.org>
182
183         Improve the way we handle the various parsing "states".  Until now
184         we've hard-coded the state transitions in the command definition
185         file, but that's error-prone and, worse, it's redundant--we can
186         figure out what state we're in anyhow.  We can cleanly handle
187         INPUT PROGRAM and FILE TYPE with a nested command-processing loop.
188         
189         * data-list.c: (cmd_data_list) Use in_file_type() or
190         in_input_program() in place of case_source_is_class() or
191         case_source_is_complex().
192
193         * file-type.c: NB: Not really fixed except minimally to compile,
194         because it doesn't work anyway.
195         (in_file_type) New function.
196         (cmd_record_type) No need to check that we're in FILE TYPE.
197         (cmd_end_file_type) Ditto.
198         (var file_type_source_class) Make static.
199
200         * get.c: (cmd_match_files) Check vfm_source instead of pgm_state.
201
202         * inpt-pgm.c: (in_input_program) New function.
203         (cmd_input_program) Rewrite to include nested command processing
204         loop.
205         (cmd_end_input_program) Just return CMD_END_SUBLOOP.
206         (var input_program_source_class) Make static.
207         (cmd_end_case) No need to check that we're in INPUT PROGRAM.
208         (cmd_end_file) Ditto.
209         
210         * automake.mk (src_language_data_io_libdata_io_a_SOURCES): Add
211         file-type.h, inpt-pgm.h.
212
213         * file-type.h: New file.
214
215         * inpt-pgm.h: New file.
216
217 Tue Apr 25 13:11:55 2006  Ben Pfaff  <blp@gnu.org>
218
219         * print.c: Don't special-case MS-DOS line terminators.
220         (macro LINE_END_WIDTH) Removed.
221         (alloc_line) Line ends are 1 byte.
222         (print_trns_proc) Just output \n for line end.
223
224 Sun Apr 23 22:05:58 2006  Ben Pfaff  <blp@gnu.org>
225
226         Continue reforming error message support.  In this phase, get rid
227         of message "titles" and put the message text in `struct error'.
228         Now `struct error' encapsulates a message more properly.
229         
230         * data-list.c: (macro RPD_ERR) Removed.
231         (rpd_msg) New function.  Updated all references to tmsg() to call
232         this function instead.
233
234 Sat Apr 15 19:38:13 2006  Ben Pfaff  <blp@gnu.org>
235
236         Remove last users of struct file_ext so we can get rid of it
237         entirely.
238         
239         * data-reader.c: (struct dfm_reader) Change file member from
240         struct file_ext to FILE *.  Updated all references.
241         (dfm_close_reader) Close file with fn_close() instead of
242         fn_close_ext().  Also, make a copy of the file name from the file
243         handle before closing it, because we can't extract it after we
244         close the file.
245         (dfm_open_reader) Open file with fn_open() instead of
246         fn_open_ext().
247
248         * data-writer.c: (struct dfm_writer) Change file member 
249         struct file_ext to FILE *.  Updated all references.
250         (dfm_close_writer) Close file with fn_close() instead of
251         fn_close_ext().  Also, make a copy of the file name from the file
252         handle before closing it, because we can't extract it after we
253         close the file.
254         (dfm_open_writer) Open file with fn_open() instead of
255         fn_open_ext().
256
257 Sat Apr 15 18:00:32 2006  Ben Pfaff  <blp@gnu.org>
258
259         * data-list.c: Add prototype to suppress warning for
260         cmd_repeating_data().
261         
262 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
263         
264         * Moved files from src directory