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