Reworked settings so as to use one large struct instead of lots of static
[pspp-builds.git] / src / data / ChangeLog
1 2008-01-19  John Darrington <john@darrington.wattle.id.au>
2
3         * settings.c settings.h: Moved static variables into a 
4         single struct.  Renamed functions to have a settings_ prefix.
5
6 2008-01-14  John Darrington <john@darrington.wattle.id.au>
7
8         * data-out.c (output_AHEX): Corrected number of bytes in
9         call to output_hex.  Closes bug #22011
10
11 2008-01-02  John Darrington <john@darrington.wattle.id.au>
12
13         * variable.c variable.h: Replaced var_get_value_name with 
14         var_append_value_name which doesn't use any static data.
15         Thanks to Ben for review.
16
17 2007-12-07  Ben Pfaff  <blp@gnu.org>
18
19         Patch #6302.
20
21         * casegrouper.c (casegrouper_get_next_group): Cause a casegrouper
22         made from an empty casereader produce a casegrouper with no
23         groups, instead of one with one group that has no cases.
24
25         * casereader.c (casereader_is_empty): New function.
26
27 2007-12-06  Ben Pfaff  <blp@gnu.org>
28
29         Patch #6303.
30
31         * sys-file-reader.c (read_display_parameters): Handle variable
32         display parameters record with only 2 data items per variable.
33         Reported by Guido Gay <gay@irer.it>.
34
35 2007-12-04  Ben Pfaff  <blp@gnu.org>
36
37         * identifier.c (lex_id_match_n): New function.
38         (lex_id_match): Reimplement in terms of lex_id_match_n.
39
40 2007-11-24  Ben Pfaff  <blp@gnu.org>
41
42         * automake.mk (src_data_libdata_a_SOURCES): Add val-type.h, to fix
43         make distcheck.
44
45 2007-11-24  Ben Pfaff  <blp@gnu.org>
46
47         Fix warning reported when reading back system files that include
48         very long string variables.  Thanks to Guido Gay <gay@irer.it> for
49         reporting this bug.
50
51         * short-names.c (short_names_assign): Fix dumb typo, in which `i'
52         was written where `j' was meant.
53
54 2007-11-18  Ben Pfaff  <blp@gnu.org>
55
56         Properly write variables that include a range of missing values to
57         system files.  Thanks to Guido Gay <gay@irer.it> for reporting
58         this bug.
59
60         * sys-file-writer.c (write_variable): Correctly calculate
61         n_missing_values field when writing variables that include a range
62         of missing values.
63
64 2007-11-10  Ben Pfaff  <blp@gnu.org>
65
66         Cleanups and bug fixes devised while writing up documentation.
67         Patch #6262.
68
69         * automake.mk (src_data_libdata_a_SOURCES): Add new files.
70
71         * dict-class.c: New file.
72         (dict_class_from_id): Move here.
73         (dict_class_to_name): Move here.
74
75         * dict-class.h: New file.
76         (enum dict_class): Move here.  Change from consecutive integers to
77         consecutive bits, to make testing for any of multiple values
78         easier.  Add new DC_ALL constant.
79
80         * dictionary.c (struct dictionary): Change `case_limit' from
81         size_t to casenumber.
82         (dict_get_vars): Make final argument an enum dict_class.
83         (dict_get_vars_mutable): Ditto.
84         (dict_get_case_limit): Change return value to casenumber.
85         (dict_set_case_limit): Change final argument to a casenumber.
86         (dict_unset_split_var): Add assertion.  Rephrase slightly.
87         (dict_set_label): Use xstrndup to simplify.
88
89         * format.c (fmt_step_width): AHEX format also needs 2-byte
90         stepping.
91         (fmt_set_style): Simplify assertions.
92
93         * missing-values.c (mv_add_num_range): Rename mv_add_range.
94         Simplify implementation.
95         (mv_has_value): Simplify implementation.
96         (mv_pop_value): Remove the first value, not the last, to avoid
97         having GET followed by SAVE reverse the order of missing values.
98         (mv_peek_value): Rename mv_get_value.  Simplify assertion.
99         (mv_has_range): Simplify implementation.
100         (mv_peek_range): Rename mv_get_range.
101         (can_resize_string): Removed.
102         (mv_is_resizable): Use value_is_resizable.
103         (mv_resize): Use value_resize.
104
105         * short-names.h (SHORT_NAME_LEN): Move here.
106
107         * val-type.h: New file, for definitions related to type and width
108         of abstract values.  Before, these definitions were mixed among
109         those related to "union value" and those related to variables.
110         (macro SYSMIS): Move here.
111         (macro LOWEST): Move here.
112         (macro HIGHEST): Move here.
113         (macro MAX_STRING); Move here.
114         (enum val_type): New enum with values VAL_NUMERIC and VAL_STRING.
115         Replaces enum var_type that had values VAR_NUMERIC and VAR_STRING.
116         All references updated.
117         (val_type_is_valid): New function.  Replaces var_type_is_valid.
118         All references updated.
119         (val_type_from_width): New function.  Replaces
120         var_type_from_width.  All references updated.
121
122         * value-labels.c (val_labs_copy): Renamed val_labs_clone.  All
123         references updated.
124         (val_labs_can_set_width): Use value_is_resizable.
125         (val_labs_add): Simply return false if the value labels set is too
126         wide, instead of having undefined behavior.
127         (val_labs_replace): Ditto.
128         (val_labs_replace): Ditto.
129         (val_labs_first): Set iterator to null if iteration is complete.
130         (val_labs_first_sorted): Ditto.
131         (val_labs_done): Become a no-op if the iterator is null.
132
133         * value.c (value_is_resizable): New function.
134         (value_resize): New function.
135
136         * variable.c (var_get_dict_class): New function.
137
138         * variable.h (macro LONG_NAME_LEN): Rename VAR_NAME_LEN.  Update
139         all references.
140
141 2007-11-08  Ben Pfaff  <blp@gnu.org>
142
143         * data-in.c: Make formatted data parsing locale-independent.
144         (parse_number): Use c_strtod instead of strtod, to avoid
145         locale-specific behavior.
146         (parse_Z): Ditto.
147
148 2007-11-06  Ben Pfaff  <blp@gnu.org>
149
150         Patch #6256: add support for binary, 360 file formats.  Reviewed
151         by John Darrington.
152
153         * data-in.c (struct data_in): Add `encoding' member.
154         (data_in): Add `encoding' parameter, and re-encode the data passed
155         in where appropriate.  Update all callers to pass it in.
156         (parse_A): Implement EBCDIC recoding wart described in manual.
157         (parse_AHEX): Implement EBCDIC recoding.
158
159         * data-out.c (data_out_legacy): New function.
160         (data_out): Make into a wrapper around data_out_legacy.
161
162         * file-handle-def.c (struct file_handle): New member `encoding'.
163         (fh_create_file): Set encoding.
164         (fh_default_properties): Set default encoding.
165         (fh_get_legacy_encoding): New function.
166
167         * file-handle-def.h (enum fh_mode): New modes FH_MODE_FIXED
168         (that replaces FH_MODE_BINARY), FH_MODE_VARIABLE,
169         FH_MODE_360_VARIABLE, FH_MODE_360_SPANNED.
170         (struct fh_properties): New member `encoding'.
171
172 2007-11-05  Ben Pfaff  <blp@gnu.org>
173
174         Patch #6258.  Reviewed by John Darrington.
175
176         * file-handle-def.c (fh_lock): Add comment that TYPE should be
177         marked with N_() in the caller.  Added these markings to each
178         caller too.  Should make i18n easier.
179         Suggested by Chusslove Illich <caslav.ilic@gmx.net>.
180
181 2007-11-03  Ben Pfaff  <blp@gnu.org>
182
183         Allow output files to overwrite input files (bug #21280).
184
185         * file-handle-def.c: Separate locking of files for input and for
186         output, to allow both to take place at once.  Also, distinguish a
187         file handle from the identity of the underlying file, because the
188         identity of a file changes over time and the file handle can't
189         represent two different identities.
190         (struct file_handle): Remove `next', `open_cnt', `deleted',
191         `type', `open_mode', `aux', `identity' members.  Change `id' from
192         char array to char *.  Add `ref_cnt' member.
193         (file_handle_from_ll) New function.
194         (file_handles) Removed.
195         (named_handles) New variable.
196         (fh_init) Initialize named_handles.
197         (fh_done) Remove name from all named_handles.
198         (free_handle) Updated for modified struct file_handle.
199         (unname_handle) New function.
200         (fh_ref) New function.
201         (fh_from_file_name) Removed.
202         (fh_unref) New function.
203         (fh_unname) New function.
204         (fh_from_id) Rewritten.
205         (create_handle) Updated for modified struct file_handle.
206         (fh_inline_file) Increment the handle's ref count.
207         (fh_create_file) Updated for modified struct file_handle.
208         (fh_create_scratch) Ditto.
209         (fh_free) Removed.
210         (mode_name) Removed.
211         (fh_open) Removed.
212         (fh_close) Removed.
213         (fh_is_open) Removed.
214         (fh_get_id) Updated for modified struct file_handle.
215         (fh_get_default_handle) Increment the handle's ref count.
216         (fh_set_default_handle) Handle ref counts.
217         (struct fh_lock) New structure.
218         (locks) New static var.
219         (fh_lock) New function.
220         (fh_unlock) New function.
221         (fh_lock_get_aux) New function.
222         (fh_lock_set_aux) New function.
223         (fh_is_locked) New function.
224         (make_key) New function.
225         (free_key) New function.
226         (compare_fh_locks) New function.
227         (hash_fh_lock) New function.
228
229         * file-handle-def.h (enum fh_access) New enum.
230
231         * file-name.c: Made file_identity the same in all supported
232         environments.
233         (struct file_identity): New `name' member.
234         (fn_get_identity): For a file that doesn't exist, get the
235         dev/inode of its directory plus its name.  If even the directory
236         doesn't exist, just use its name.  Merge the Windows
237         implementation into the Unix one.
238         (fn_compare_file_identities): Rewritten.  Merge the Windows
239         implementation into the Unix one.
240         (fn_hash_identity): New function.
241
242         * make-file.c (struct replace_file): New structure.
243         (all_files): New static var.
244         (replace_file_start): New function.
245         (replace_file_commit): New function.
246         (replace_file_abort): New function.
247         (free_replace_file): New function.
248         (unlink_replace_files): New function.
249
250         * por-file-reader.c (struct pfm_reader): Add `lock' member.
251         (close_reader): Unlock file.
252         (pfm_open_reader): Lock file.
253
254         * por-file-writer.c (struct pfm_writer): Add fh_lock, replace_file
255         members.
256         (pfm_open_writer): Lock file and prepare for its replacement.
257         (close_writer): Unlock file.
258
259         * scratch-handle.h (struct scratch_handle): Add unique_id so that
260         different generations of a scratch file can be distinguished.
261
262         * scratch-reader.c (scratch_reader_open): Verify that the file is
263         a scratch file.
264
265         * scratch-writer.c (struct scratch_writer): Add `lock' and `dict',
266         remove scratch_handle member.
267         (scratch_writer_open): Lock handle.  Prepare to replace handle
268         data, instead of doing it immediately.
269         (scratch_writer_casewriter_destroy): Replace handle data and
270         unlock handle.
271
272         * sys-file-reader.c (struct sfm_reader): Add `lock' member.
273         (sfm_open_reader): Lock file.
274         (close_reader): Unlock file.
275
276         * sys-file-writer.c (struct sfm_writer): Add fh_lock, replace_file
277         members.
278         (sfm_open_writer): Lock file and prepare for its replacement.
279         (close_writer): Unlock file.
280
281 2007-11-02  Ben Pfaff  <blp@gnu.org>
282
283         * data-out.c (output_number): Use isfinite (from C99) instead of
284         gsl_isfinite, since we now have universal support for it in
285         gnulib.
286         (output_infinite): Ditto.
287         [!HAVE_ROUND] (round): Remove definition, since we now have a
288         replacement in gnulib.
289
290 2007-10-27  John Darrington <john@darrington.wattle.id.au>
291
292         * dictionary.c: Fixed bug in dict_clone, where the vardict.dict member
293         wasn't initialised correctly. Closes bugs #21330 and 21397
294
295
296 2007-10-08  Ben Pfaff  <blp@gnu.org>
297
298         Fix bug #21280.  Thanks to John Darrington for review.
299
300         * file-name.c (create_stream): New function.
301
302         * por-file-writer.c (pfm_open_writer): Use fh_open to open the
303         file handle before creating the file, to ensure that we don't
304         truncate a file that we're reading.  Make code easier to read by
305         using create_stream.
306
307         * sys-file-write.c (sfm_open_writer): Ditto.
308
309 2007-10-01  Ben Pfaff  <blp@gnu.org>
310
311         Fix bug #21192.  Thanks to John Darrington for review.
312
313         * casereader.c (casereader_read): Decrement case_cnt before
314         calling the casereader's "read" member function, so that we
315         interact properly with lazy_casereader.
316
317         * datasheet.c: Add regression test for above bug fix.
318         (clone_datasheet): New function.
319         (lazy_callback): New function.
320         (check_datasheet_casereader): New function.
321         (check_datasheet): Check datasheet contents are reported correctly
322         through an ordinary casereader and a lazy casereader.
323         (clone_model): Use clone_datasheet.
324
325 2007-09-24  Ben Pfaff  <blp@gnu.org>
326
327         Patch #6210.  Reviewed by John Darrington.
328         * settings.c: Drop "long view", which is not needed any longer.
329         (static var long_view): Removed.
330         (force_long_view): Removed.
331         (get_viewwidth): Removed.
332         (init_viewport): Removed long_view reference.
333
334 2007-09-19  John Darrington <john@darrington.wattle.id.au>
335         
336         * settings.c settings.h: Changed viewport's length and width to be 
337         owned by the user interface which uses the data library.  This allows
338         better abstraction, and makes dynamically adjustable dimensions easier.
339         
340 2007-09-18  Ben Pfaff  <blp@gnu.org>
341
342         * procedure.c (proc_extract_active_file_data): New function.
343
344         * lazy-casereader.h: New file.
345
346         * lazy-casereader.c: New file.
347
348         * casereader.c (casereader_dynamic_cast): New function.
349
350 2007-09-14  Ben Pfaff  <blp@gnu.org>
351
352         * dictionary.c (dict_clone): Copy case indexes from cloned
353         dictionary.  Fixes bug #21061.  Reviewed by John Darrington.
354
355 2007-09-13  John Darrington <john@darrington.wattle.id.au>
356
357         * value.c value.h (create_value): New function.
358
359 2007-09-12  Ben Pfaff  <blp@gnu.org>
360
361         Make it clear that translator casereader and casewriter translate
362         functions are supposed to destroy their input case.
363         
364         * casereader-translator.c (struct casereader_translator): Change
365         input case parameter of translate member function from const
366         struct ccase * to struct ccase *.
367         (casereader_create_translator): Ditto, for translate parameter.
368
369         * casewriter-translator.c (struct casewriter_translator): Ditto.
370         (casewriter_create_translator): Ditto.
371
372 2007-08-27  John Darrington <john@darrington.wattle.id.au>
373         
374         * sys-file-reader.c (read_display_parameters): Force display width 
375         to 8, if the sys file says 0 (like SPSS does).
376
377 2007-08-12  Ben Pfaff  <blp@gnu.org>
378
379         * dictionary.c (dict_dump): New function.
380
381 2007-08-12  Ben Pfaff  <blp@gnu.org>
382
383         Drop dict_compactor in favor of using the new struct case_map.
384
385         * dictionary.c (struct copy_map): Removed.
386         (struct dict_compactor): Removed.
387         (dict_make_compactor): Removed.
388         (dict_compactor_compact): Removed.
389         (dict_compactor_destroy): Removed.
390
391         * procedure.c (struct data_set): Change `compactor' member to be a
392         struct case_map *.
393         (proc_open): Use case_map_to_compact_dict instead of
394         dict_make_compactor.
395         (proc_casereader_read): Use case_map_execute instead of
396         dict_compactor_compact.
397         (proc_commit): Use case_map_destroy instead of
398         dict_compactor_destroy.
399
400         * scratch-writer.c (struct scratch_writer): Change `compactor'
401         member to be a struct case_map *.
402         (scratch_writer_open): Use case_map_to_compact_dict instead of
403         dict_make_compactor.
404         (scratch_writer_casewriter_write): Use case_map_execute instead of
405         dict_compactor_compact.
406
407 2007-08-12  Ben Pfaff  <blp@gnu.org>
408
409         * automake.mk: Add case-map.c, case-map.h.
410
411         * case-map.c: New file.
412
413         * case-map.h: New file.
414
415 2007-08-12  Ben Pfaff  <blp@gnu.org>
416
417         * dictionary.c (dict_compact_values): Don't delete scratch
418         variables as well as compacting case indexes.  Update all callers.
419         (dict_get_compacted_value_cnt): Rename dict_count_values and
420         change interface.  Update all callers.
421         (dict_get_compacted_value_cnt): Remove.
422         (dict_compacting_would_shrink): Remove.
423         (dict_compacting_would_change): Remove.
424         (dict_make_compactor): Add new parameter.  Update all callers.
425         
426         * procedure.c (proc_casereader_read): Use casewriter_get_value_cnt
427         instead of dict_count_values, changing an O(N) operation into
428         O(1).
429
430 2007-08-12  Ben Pfaff  <blp@gnu.org>
431
432         * casereader.c (casereader_read): Don't require cases read by a
433         casereader to be exactly the expected size: as long as they're big
434         enough, it's OK.
435
436 2007-08-12  Ben Pfaff  <blp@gnu.org>
437
438         Make casewriters keep track of the number of `union value's in
439         each case.  This is useful for two reasons: casewriter_write can
440         then check that the case being written is large enough, and later
441         recipients of the casewriter can determine the size of the case.
442         
443         * casewriter-translator.c (casewriter_create_translator): Add
444         value_cnt parameter.
445         
446         * casewriter.c (struct casewriter): Add value_cnt member.
447         (casewriter_write): Check that the case passed in is big enough.
448         (casewriter_get_value_cnt): New function.
449         (casewriter_create): Add value_cnt parameter.
450
451 2007-08-09  Ben Pfaff  <blp@gnu.org>
452
453         Fix bug reported by Jason Stover.
454         * settings.c: Move get_termcap_viewport and in particular the
455         #include for <curses.h> to the end of the file.  curses.h
456         redefines bool on some systems (e.g. OpenBSD), which causes
457         disagreement between uses of bool before its inclusion and
458         afterward.
459         Tested by Jason Stover.
460
461 2007-07-29  Ben Pfaff  <blp@gnu.org>
462
463         Provisional fix for bug #18692 and bug #20161.  Reviewed by John
464         Darrington.
465
466         * file-name.c (fn_open): Only pass "r" or "w" to popen as mode
467         argument (never "rb" or "wb") because SUSv3 says that only those
468         modes are defined, and glibc in fact rejects other modes.
469
470         Open portable files with fn_open so that they can be read from
471         pipes.  Fix missing fh_close call to go along with fh_open.
472         Report an error if the file close reports an error.
473         * por-file-reader.c (close_reader): New function.
474         (por_file_casereader_destroy): Use close_reader.
475         (pfm_open_reader): Open file with fn_open.
476
477 2007-07-28  Ben Pfaff  <blp@gnu.org>
478
479         Make PSPP able to read all the portable files I could find on the
480         web.  Thanks to John Darrington for review.  Bug #17620.
481         * por-file-reader.c (struct pfm_reader): New member `line_length'.
482         (error): Print file offset in hexadecimal.
483         (warning): New function.
484         (advance): Treat lines less than 80 bytes long as padded to 80
485         bytes with spaces.
486         (pfm_open_reader): Call read_documents if we find an "E" record.
487         (convert_format): Convert invalid formats to the default format
488         instead of aborting reading the file.
489         (read_variables): Rename duplicate variable names instead of
490         aborting reading the file.
491         (read_value_label): Allow string variables of different widths to
492         be assigned value labels in the same record.  Replace duplicate
493         value labels instead of aborting.
494         (read_documents): New function.
495
496         * por-file-writer.c (pfm_open_writer): Call write_documents if the
497         dictionary has documents.
498         (write_documents): New function.
499
500 2007-07-25  Ben Pfaff  <blp@gnu.org>
501
502         Fix bugs related to bug #17213.
503
504         * settings.c: Use HAVE_LIBNCURSES instead of HAVE_LIBTERMCAP,
505         since the former is what config.h has.  Include the needed ncurses
506         headers.
507         (static var echo) Rename to `do_echo' because the original name is
508         the same as an ncurses identifier.
509         (get_termcap_viewport) Use error instead of msg.
510
511         * file-name.c (fn_interp_vars): Fix interpolation of $VARS.
512         (fn_close): Don't close stdin, stdout, stderr.
513
514 2007-07-26 John Darrington <john@darrington.wattle.id.au>
515
516         * procedure.c procedure.h: Added callbacks which get invoked whenever 
517         a dataset's transformation chain changes.
518
519 2007-07-24  Ben Pfaff  <blp@gnu.org>
520
521         Fix bug #6113.
522         * sys-file-writer.c (write_variable_display_parameters): Use new
523         var_default_display_width function to choose display width of
524         segments after the first one in a given variable.
525         * variable.c (var_create): Use var_default_display_width to pick
526         new variable's display width.
527         (var_default_display_width): New function.
528         Reviewed by John Darrington.
529
530 2007-07-24  Ben Pfaff  <blp@gnu.org>
531
532         Fix bug #20427.
533         * por-file-writer.c (write_variables): Write weight variable.
534         Reviewed by John Darrington.
535
536 2007-07-23  Ben Pfaff  <blp@gnu.org>
537
538         Improvements to system file reader and writer.
539         
540         First, move all detailed knowledge of very long strings into
541         sys-file-private.[ch], so that this nasty stuff can be isolated.
542
543         * sys-file-private.c (REAL_VLS_CHUNK): New macro.
544         (EFFECTIVE_VLS_CHUNK): New macro.
545         (min_int): New function.
546         (max_int): New function.
547         (sfm_width_to_bytes): Rewrite.
548         (sfm_width_to_octs): New function.
549         (sfm_segment_alloc_width): New function.
550         (sfm_segment_alloc_bytes): New function.
551         (sfm_segment_used_bytes): New function.
552         (sfm_segment_offset): New function.
553         (sfm_segment_effective_offset): New function.
554         (sfm_dictionary_to_sfm_vars): New function.
555
556         * sys-file-private.h (MIN_VERY_LONG_STRING): Removed.
557         (EFFECTIVE_LONG_STRING_LENGTH): Removed.
558         (struct sfm_var): New structure.
559
560         Next, improvements to the system file reader.
561
562         * sys-file-reader.h (struct sfm_read_info): Changed `case_cnt' to
563         type casenumber.  Added `version_major', `version_minor',
564         `version_revision'.
565
566         * sys-file-reader.c (struct sfm_reader): Replaced `flt64_cnt' by
567         `oct_cnt'.  Rename `vars', `var_cnt' to `sfm_vars', `sfm_var_cnt'.
568         Change `case_cnt' to type casenumber.  Removed `has_vls'.
569         (struct sfm_var): Removed.
570         (sfm_open_reader): Don't warn on wrong case size if the file was
571         written by SPSS 13, which tends to get it wrong.  Use
572         sfm_dictionary_to_sfm_vars.
573         (read_header): Always output system file info.
574         (read_variable_record): Simplify code for reading missing values.
575         (read_machine_int32_info): Save version numbers from system file
576         into info struct passed as new argument.
577         (read_long_string_map): Restructured to use new sys-file-private
578         functions.
579         (read_value_labels): Use size_overflow_p.
580         (sys_file_casereader_read): Get rid of distinction between fast
581         and slow paths.  Use information provided by sys-file-primate's
582         struct sfm_var to simplify code.
583         (skip_whole_strings): New function.
584         (read_int32): Renamed read_int.  Changed return value to int.
585         Updated all callers.
586         (read_flt64): Renamed read_float.  Changed return value to
587         double.  Updated all callers.
588         (int32_to_native): Removed.  Changed callers to use
589         integer_convert.
590         (flt64_to_double): Removed.  Changed callers to use float_convert.
591         
592         Finally, get rid of int32, flt64 terminology and types in system
593         file writer.  The former wasn't very useful since a POSIX "int"
594         can hold the whole range of int32 and we generally didn't have a
595         need for it to be exactly-32-bits, just at-least-32-bits.  The
596         latter was inconvenient because we had to assume that it could be
597         different from double and thereby convert special values SYSMIS,
598         HIGHEST, LOWEST to and from it in multiple places.  Instead, now
599         we just use "int" and "double" in most places, and do conversions,
600         if necessary, very close to where we do I/O.  This change meant
601         that the writer code couldn't represent records in the file as C
602         structs any longer, but that's no great loss.  The code actually
603         seems to be more readable without them.
604
605         Simplify the compression buffering code: only buffer as much as
606         necessary, which is no more than eight 8-byte units at any given
607         time.
608
609         * sys-file-writer.c (typedef flt64): Removed.
610         (macro second_lowest_flt64): Removed.
611         (struct sysfile_header): Removed.
612         (struct sysfile_variable): Removed.
613         (struct sfm_writer): Removed `needs_translation', `has_vls',
614         `flt64_cnt'.  Changed `compress' to type bool and `case_cnt' to
615         type casenumber.  Renamed `vars' to `sfm_vars', `var_cnt' to
616         `sfm_var_cnt'.  Replaced `buf', `end', `ptr', `x', `y' for
617         compression buffering by `opcodes', `opcode_cnt', `data',
618         `data_cnt'.  Renamed `var_cnt_vls' as `segment_cnt'.
619         (sfm_open_writer): Use sfm_dictionary_to_sfm_vars.  Use simple
620         data writer functions instead of structures.
621         (calc_oct_idx): New function.
622         (write_header): Use simple data writer functions instead of
623         structures.
624         (write_format_spec): Renamed write_format.  New argument.
625         (write_variable_continuation_records): New function.
626         (write_variable): Use simple data writer functions instead of
627         structures.  Use write_variable_continuation_records.  Write
628         entire very long string instead of requiring caller to understand
629         them.
630         (write_value_labels): Use simple data writer functions instead of
631         structures.
632         (write_documents): Ditto.
633         (write_variable_display_parameters): Use sys-file-private
634         functions to simplify.  Use simple data writer functions instead
635         of structures.
636         (write_vls_length_table): Use simple data writer functions instead
637         of structures.
638         (write_longvar_table): Ditto.
639         (write_rec_7_34): Break into new functions
640         write_integer_info_record, write_float_info_record.  Use simple
641         data writer functions instead of structures.
642         (buf_write): Removed.
643         (append_string_max): Removed.
644         (ensure_buf_space): Removed.
645         (sys_file_casewriter_write): Get rid of the distinction between
646         fast and slow paths, which didn't seem to be too useful.  Use new
647         functions write_case_uncompressed, write_case_compressed.
648         (put_instruction): Removed.
649         (put_element): Removed.
650         (write_compressed_data): Removed.
651         (close_writer): Use flush_compressed.  Only write case count to
652         system file if it will fit in the field.
653         (write_case_compressed): New function.
654         (write_case_uncompressed): New function.
655         (flush_compressed): New function.
656         (put_cmp_opcode): New function.
657         (put_cmp_number): New function.
658         (write_int): New function.
659         (convert_double_to_output_format): New function.
660         (write_float): New function.
661         (write_value): New function.
662         (write_string): New function.
663         (write_bytes): New function.
664         (write_zeros): New function.
665         (write_spaces): New function.
666
667         Reviewed by John Darrington.
668
669 2007-07-22  Ben Pfaff  <blp@gnu.org>
670
671         Don't try to write very long strings to portable files.  The
672         format does not support it.
673
674         * por-file-writer.c (MAX_POR_WIDTH): New macro.
675         (pfm_open_writer): Limit output width to MAX_POR_WIDTH.
676         (write_format): Add arg to take width to resize format to.
677         (write_value): Limit width of value written to MAX_POR_WIDTH.
678         (write_variables): Limit width of variable and its output formats
679         to MAX_POR_WIDTH.
680         Reviewed by John Darrington.
681
682 2007-07-22  Ben Pfaff  <blp@gnu.org>
683
684         * sys-file-reader.c (read_variable_to_value_map): Use max_warnings
685         local variable instead of literal 5.
686         Reviewed by John Darrington.
687         
688 2007-07-22  Ben Pfaff  <blp@gnu.org>
689
690         Fix problems with uniqueness of short names in system files with
691         very long string variables.  Now a variable may have multiple
692         short names.
693         
694         * automake.mk (src_data_libdata_a_SOURCES): Add new files
695         short-names.c, short-names.h.
696
697         * dictionary.c (dict_clone): Clone all the short names.
698         (compare_strings): Move into short-names.c.
699         (hash_strings): Ditto.
700         (set_var_short_name_suffix): Ditto.
701         (dict_assign_short_names): Ditto, rename short_names_assign,
702         change to assign all short names.
703         
704         * por-file-writer.c (write_variables): Use short_names_assign
705         instead of dict_assign_short_names.
706
707         * short-names.c: New file.
708
709         * short-names.h: New file.
710
711         * sys-file-private.c (sfm_width_to_segments): New function.
712
713         * sys-file-reader.c (read_long_var_name_map): Save and restore all
714         the short names, not just the first one.
715         
716         * sys-file-writer.c (cont_var_name): Removed.
717         (sfm_open_writer): Use short_names_assign instead of
718         dict_assign_short_names.  Use unique short names assigned by
719         short_names_assign instead of those generated by cont_var_name.
720
721         * variable.c (struct variable): Remove `short_name' member,
722         replace by `short_names' and `short_name_cnt'.
723         (var_create) Initialize new members.
724         (var_get_short_name_cnt): New function.
725         (var_get_short_name): Now takes an index argument.  Changed most
726         callers to pass 0.
727         (var_set_short_name): Ditto.
728         (var_clear_short_name): Renamed var_clear_short_names, changed to
729         clear all short names.
730         
731         Reviewed by John Darrington.
732
733 2007-07-22  Ben Pfaff  <blp@gnu.org>
734
735         * variable.c (var_set_width): Use new var_set_width function.
736
737         * missing-values.c (mv_n_values): Drop assertion, which was not
738         needed.
739
740         * format.c (fmt_default_for_width): New function.
741         (fmt_resize): New function.
742
743         Reviewed by John Darrington.
744
745 2007-07-18 John Darrington <john@darrington.wattle.id.au>
746
747         * datasheet.c (datasheet_delete_columns): Added assertion to check
748         we're not deleting outside the range of the sheet.  
749
750         
751         * dictionary.c dictionary.h variable.c: Added the ability for string
752         variables to be resized.
753         
754         * vardict.h: Added some prototypes (moved from dictionary.h) as
755         these should only be called by variable.c
756
757
758 2007-07-14 John Darrington <john@darrington.wattle.id.au>
759
760         * sfm-reader.c: Respect case_cnt field in file header.
761
762 2007-07-01 John Darrington <john@darrington.wattle.id.au>
763
764         * transformation.c transformation.h (trns_chain_execute): Changed the 
765         signature (Patch #6057)
766
767 2007-06-10  Ben Pfaff  <blp@gnu.org>
768
769         * casereader-filter.c (casereader_filter_destroy): Make sure to
770         write all the remaining excluded cases to the casewriter, if any.
771
772         * caseinit.c (init_list_destroy): Rewrite.
773         (init_list_clear): Ditto.
774
775         * casegrouper.c (casegrouper_get_next_group): Always set *reader
776         to null when returning false.
777
778 2007-06-06  Ben Pfaff  <blp@gnu.org>
779
780         Actually implement the new procedure code and adapt all of its
781         clients to match.  Also adapt all of the other case sources and
782         sinks in the tree and their clients to use the
783         casereader/casewriter infrastructure.
784
785         * automake.mk: Add and remove files.
786
787         * any-reader.c: Change into a casereader.
788         * por-file-reader.c: Ditto.
789         * scratch-reader.c: Ditto.
790         * sys-file-reader.c: Ditto.
791
792         * any-writer.c: Change into a casewriter.
793         * por-file-writer.c: Ditto.
794         * scratch-writer.c: Ditto.
795         * sys-file-writer.c: Ditto.
796
797         * procedure.c: Change to use casereader, casewriter, caseinit, and
798         other new infrastructure.
799
800         * scratch-handle.c: Adapt to new infrastructure.
801
802         * case-sink.c: Removed, now dead code.
803         * case-sink.h: Ditto.
804         * case-source.c: Ditto.
805         * case-source.h: Ditto.
806         * casefile-factory.c: Ditto.
807         * casefile-private.h: Ditto.
808         * casefile.c: Ditto.
809         * casefile.h: Ditto.
810         * casefilter.c: Ditto.
811         * casefilter.h: Ditto.
812         * fastfile.c: Ditto.
813         * fastfile.h: Ditto.
814         * fastfile-factory.c: Ditto.
815         * fastfile-factory.h: Ditto.
816         * storage-stream.c: Ditto.
817         * storage-stream.h: Ditto.
818
819 2007-06-06  Ben Pfaff  <blp@gnu.org>
820
821         Add datasheet code.
822
823         * automake.mk: Add new files.
824
825         * datasheet.c: New file.
826
827         * datasheet.h: New file.
828
829 2007-06-06  Ben Pfaff  <blp@gnu.org>
830
831         Until now, the procedure code has provided a case to the
832         case_source, which has filled in the data values that come from
833         the active file.  "Left" data values that don't come from the
834         active file naturally stay the same from case to case, because the
835         procedure code keeps using that same case.
836
837         One of the compromises that comes with the new procedure code is
838         that the active file allocates and provides its own case, which
839         the procedure code then has to resize to provide room for any
840         other variables that should go in the case and then fill in the
841         values of "left" variables.  Then, when we're done with that case,
842         we have to save the values of "left" variables to copy into the
843         next case read from the active file.
844
845         The caseinit code helps with this.
846
847         * automake.mk: Add new files.
848
849         * caseinit.c: New file. 
850
851         * caseinit.h: New file. 
852
853 2007-06-06  Ben Pfaff  <blp@gnu.org>
854
855         * value.h (value_cnt_from_width): New function.
856
857         * variable.c (var_get_value_cnt): Use new function.
858
859 2007-06-06  Ben Pfaff  <blp@gnu.org>
860
861         Add casegrouper, to allow cases read from a given casereader to be
862         broken into groups, each of which has its own casereader.
863         Generally cases are grouped based on having equal values for some
864         set of variables.
865
866         * automake.mk: Add new files.
867
868         * casegrouper.c: New file.
869
870         * casegrouper.h: New file.
871
872 2007-06-06  Ben Pfaff  <blp@gnu.org>
873
874         Add interface to lexicographical ordering of cases.
875
876         * automake.mk: Add new files.
877
878         * case-ordering.c: New file.
879
880         * case-ordering.h: New file.
881
882 2007-06-06  Ben Pfaff  <blp@gnu.org>
883
884         Add casereaders and casewriters, the basis of the new data processing
885         implementation.  A casereader is a uniform interface to reading cases
886         from a data source; a casewriter is a uniform interface to writing
887         cases to a data sink.
888
889         * automake.mk: Add new files.
890         
891         * casereader-filter.c: New file.
892         
893         * casereader-provider.h: New file.
894
895         * casereader-translator.c: New file.
896         
897         * casereader.c: New file.
898         
899         * casereader.h: New file.
900         
901         * casewriter-provider.h: New file.
902         
903         * casewriter-translator.c: New file.
904         
905         * casewriter.c: New file.
906         
907         * casewriter.h: New file.
908
909 2007-06-06  Ben Pfaff  <blp@gnu.org>
910
911         "casewindow" data structure that extends the deque (from libpspp)
912         of cases with the ability to dump cases to disk if we get too many
913         of them in memory.
914
915         * automake.mk: Add new files.
916
917         * casewindow.c: New file.
918
919         * casewindow.h: New file.
920
921 2007-06-06  Ben Pfaff  <blp@gnu.org>
922
923         sparse_cases data structure that augments a sparse_array of cases
924         with the ability to dump cases to disk if we get too many cases in
925         memory.
926
927         * automake.mk: Add new files.
928
929         * sparse-cases.c: New file.
930
931         * sparse-cases.h: New file.
932
933 2007-06-06  Ben Pfaff  <blp@gnu.org>
934
935         Adds a low-level on-disk case array data structure.
936         
937         * automake.mk: Add new files.
938
939         * case-tmpfile.c: New file.
940
941         * case-tmpfile.h: New file.
942
943 2007-06-06  Ben Pfaff  <blp@gnu.org>
944
945         In a couple of places we calculate the maximum number of cases to
946         keep in memory based on the user-defined workspace.  Enable
947         centralizing the calculation through a new function.
948         
949         * settings.c (get_workspace_cases): New function.
950
951 2007-06-06  Ben Pfaff  <blp@gnu.org>
952
953         The casenumber type is defined in transformations.h, but case.h is
954         a more sensible place.  Move it.
955
956         * case.h (CASENUMBER_MAX): New macro.
957         (typedef casenumber): Move here, from transformations.h.
958
959 2007-06-03  Ben Pfaff  <blp@gnu.org>
960
961         Slightly generalize case_to_values and case_from_values functions.
962
963         * case.c (case_to_values): Rename case_copy_out, change interface.
964         (case_from_values): Rename case_copy_in, change interface.
965
966         * fastfile.c (fastfilereader_get_next_case): Update caller.
967         (write_case_to_disk): Ditto.
968
969 2007-06-02  Ben Pfaff  <blp@gnu.org>
970
971         Clean up after a forgotten part of patch #5829.
972         
973         * casedeque.h: Remove unused file.
974
975         * automake.mk: Remove casedeque.h from sources.
976
977 2007-05-10  Jason Stover  <jhs@math.gcsu.edu>
978
979         * category.c: Removed redundant #include
980
981 2007-05-06  Ben Pfaff  <blp@gnu.org>
982
983         Abstract the documents within a dictionary a little better.
984         Thanks to John Darrington for suggestion, initial version, and
985         review.  Patch #5917.
986
987         * dictionary.c (struct dictionary): Change `documents' member from
988         char * to struct string.
989         (dict_clear): Destroy struct string.
990         (dict_get_documents): Convert struct string to char *.
991         (dict_set_documents): Set struct string.  Pad to 80-character
992         multiple.
993         (dict_clear_documents): New function.
994         (dict_add_document_line): New function.
995         (dict_get_document_line_cnt): New function.
996         (dict_get_document_line): New function.
997
998         * dictionary.h (macro DOC_LINE_LENGTH): New macro.
999
1000         * sys-file-reader.c (read_documents): Use new document functions.
1001
1002 2007-04-19 John Darrington <john@darrington.wattle.id.au>
1003
1004         * sys-file-reader.c: When reading a system file which has no 
1005         long name table, automatically create one where the long names 
1006         are the lower case versions of the short names.
1007         
1008 2007-04-22  Ben Pfaff  <blp@gnu.org>
1009
1010         * dictionary.c (dict_set_split_vars): dict_destroy expects that
1011         dict_clear will free most data related to the dictionary.
1012         dict_clear does a decent job, except that dict_set_split_vars on
1013         some systems won't actually free the dict's "split" member.
1014         Instead, it'll allocate a 1-byte region.  Fix this.
1015
1016         * value.c (value_copy): New function.
1017         (value_set_missing): Ditto.
1018
1019 2007-04-22 John Darrington <john@darrington.wattle.id.au>
1020
1021         * Deleted existing category.h and moved cat-routines.h into 
1022         category.h  Encapsulated struct cat_vals better.
1023
1024 2007-04-19 John Darrington <john@darrington.wattle.id.au>
1025
1026         * sys-file-reader.c: When reading a system file which has no 
1027         long name table, automatically create one where the long names 
1028         are the lower case versions of the short names.
1029         
1030 2007-04-16 John Darrington <john@darrington.wattle.id.au>
1031
1032         * sys-file-reader.c: Some versions of Other Software seem to 
1033         produce system files with string  variables' measure set to 
1034         zero.  We'll assume these are supposed to be nominal variables.
1035
1036 2007-03-30  Ben Pfaff  <blp@gnu.org>
1037
1038         * procedure.c: Adapt to new deque data structure.
1039
1040 Mon Feb 19 10:53:21 2007  John McCabe-Dansted <gmatht@gmail.com>
1041                           Ben Pfaff <blp@gnu.org>
1042
1043         * file-name.c: Mingw compatibility fixes.
1044         (fn_search_path): Use ISSLASH instead of comparing against '/'
1045         directly.
1046         (fn_dir_name): Use dir_name from gnulib.
1047         (fn_is_absolute): Use IS_ABSOLUTE_FILE_NAME from gnulib.
1048         (fn_get_identity): Use GetFullPathName instead of canonicalize
1049         from gnulib, because the latter does not fully support
1050         Windows-style path names.  Use this implementation based on the
1051         detected presence of Windows instead of the absence of Unix, since
1052         the new implementation is Windows-specific.
1053         (fn_compare_file_identities): In Windows implementation, compare
1054         names case-insensitively.
1055
1056 Sun Feb 18 13:28:02 2007  Ben Pfaff  <blp@gnu.org>
1057
1058         * make-file.c: Don't include mkstemp.h, because gnulib now causes
1059         <stdlib.h> to have the same effect.
1060
1061 Sun Feb 18 11:20:24 2007  Ben Pfaff  <blp@gnu.org>
1062
1063         * por-file-reader.c: Add missing _() around messages.
1064
1065 Sun Feb 11 20:44:13 2007  Ben Pfaff  <blp@gnu.org>
1066
1067         * make-file.c: Include "mkstemp.h", without which linking on
1068         mingw32 fails.
1069
1070 Thu Feb  8 14:59:05 2007  Ben Pfaff  <blp@gnu.org>
1071  
1072         Reduce platform dependence.
1073  
1074         * file-name.c (fn_tilde_expand): Removed, and removed calls to it.
1075         Everywhere we using this, we really should have just depended on
1076         the shell to expand tildes.
1077         (fn_search_path): Simplify, given that we don't do tilde expansion
1078         any longer.
1079         (fn_normalize): Removed.  Caller changed to use the canonicalize
1080         module from gnulib.
1081         (fn_get_cwd): Removed.  Only user was fn_normalize.
1082         (fn_is_absolute): Really only test for absolute names.
1083         (fn_is_special): Use pipe files if HAVE_POPEN, not if we're in
1084         unix.
1085         (fn_readlink): Removed, as it was only used fn_normalize.
1086         (fn_exists): Assume the stat function is available; gnulib does.
1087         (fn_open): Use pipe files if HAVE_POPEN, not if we're in unix.
1088  
1089 Sat Feb  3 21:52:17 2007  Ben Pfaff  <blp@gnu.org>
1090
1091         * dictionary.c (dict_create_vector_assert): New function.
1092
1093 Wed Feb  7 21:25:15 2007  Ben Pfaff  <blp@gnu.org>
1094
1095         * file-name.c (fn_normalize): Correct name of function
1096         fn_is_special.  Thanks to John McCabe-Dansted <gmatht@gmail.com>
1097         for pointing this out.
1098
1099 Thu Feb  1 16:53:37 2007  Ben Pfaff  <blp@gnu.org>
1100
1101         We are using a single member in struct file_handle, the "name"
1102         field, for more than one purpose.  When it begins with '"', it's a
1103         file name; otherwise, it's a token that can be used to identify
1104         it.  When that assertion fires, it's because we searched for the
1105         name case-sensitively as a file name (so that there was no match),
1106         and then we try to insert it case-insensitively as a token, which
1107         fails because duplicates aren't allowed.
1108
1109         Solution: break the two purposes into two separate fields.  This
1110         fixes the problem and likely makes the code easier to read too.
1111
1112         Fixes bug #18922.  Thanks to John Darrington for bug report and
1113         review.
1114
1115         * file-handle-def.c (struct file_handle): New `id' member.
1116         (fh_from_name): Rename fh_from_id.  Update all callers.
1117         (create_handle): New `id' parameter.  Update all callers.
1118         (fh_create_file): Ditto.
1119         (fh_get_id): New function.
1120
1121 Mon Jan 15 16:18:10 2007  Ben Pfaff  <blp@gnu.org>
1122
1123         * case.c (case_is_null): Change return type to bool.
1124
1125 Mon Jan 15 10:57:28 2007  Ben Pfaff  <blp@gnu.org>
1126
1127         Add debugging code.
1128         
1129         * case.c (case_clone) [DEBUGGING]: When debugging, don't use
1130         reference counting to share data.  This makes it easy for
1131         valgrind, etc. to find accesses to cases that have been destroyed
1132         but have been kept around by another user's ref-count.  This often
1133         happens when the data set is small enough to find in memory; if a
1134         bigger data set that would overflow to disk were used, then data
1135         corruption would occur.
1136
1137 Mon Jan 15 10:55:18 2007  Ben Pfaff  <blp@gnu.org>
1138
1139         Simplify code.
1140
1141         * case.c (case_unshare): Make it check internally whether the
1142         ref_cnt is greater than 1, so that the callers don't have to.
1143         Update callers not to check.
1144
1145 Mon Jan 15 10:53:01 2007  Ben Pfaff  <blp@gnu.org>
1146
1147         Before, I was thinking that I might want to get rid of reference
1148         counting at some point.  Now, I'm pretty sure that it's here to
1149         stay.  Thus, because we have to store the value_cnt anyway for
1150         reference-counted cases, we might as well expose it to users.
1151
1152         * case.c (case_get_value_cnt): New function.
1153         (case_resize): Drop OLD_CNT argument.  Update all callers.  Only
1154         resize case if its size actually changed.
1155
1156         * casefile.c (casefile_append_xfer): Use case_get_value_cnt
1157         instead of peeking inside struct case directly.
1158         (casefile_append): Ditto.
1159
1160 Mon Jan 15 10:50:22 2007  Ben Pfaff  <blp@gnu.org>
1161
1162         Get rid of the inlines for the case functions, which made the
1163         header file hard to read.  (Also, in testing with "-O2 -DNDEBUG",
1164         the inlines didn't speed up "make check" at all, which is not a
1165         perfect benchmark but seems indicative.)
1166         
1167         * case.c: Remove #ifdef DEBUGGING...#endif around many function
1168         definitions.  Remove some assertions on nonnull pointers that were
1169         redundant with a pointer dereference soon after in the function.
1170         Also:
1171         (struct case_data): Move definition here from case.h.
1172         (case_data): Ditto.
1173         (case_num): Ditto.
1174         (case_str): Ditto.
1175         (case_data_wr): Ditto.
1176         
1177 Sun Jan 14 21:41:12 2007  Ben Pfaff  <blp@gnu.org>
1178
1179         * automake.mk: Add casedeque.h to sources.
1180         
1181         * casedeque.h: New file.
1182
1183         * procedure.c: (struct dataset) Change lag_count, lag_head,
1184         lag_queue member into single struct casedeque member.  Update all
1185         users to use the casedeque instead.
1186         (lag_case) Removed.
1187
1188 Sun Jan 14 21:43:12 2007  Ben Pfaff  <blp@gnu.org>
1189
1190         * procedure.c: Simplify lagged cases interface.  Updated all
1191         clients--well, the only client--to use the simplified interface.
1192         (dataset_n_lag) Removed.
1193         (dataset_set_n_lag) Removed.
1194         (dataset_need_lag) New function.
1195
1196 Tue Jan  9 07:20:05 WST 2007 John Darrington <john@darrington.wattle.id.au>
1197
1198         * dictionary.c procedure.c: More changes to ensure that callbacks occur
1199         whenever appropriate, but only when the dataset/dictionary is in a 
1200         consistent state.
1201
1202 Sun Jan  7 08:33:04 WST 2007 John Darrington <john@darrington.wattle.id.au>
1203
1204         * dictionary.c dictionary.h : Added callbacks for change of filter and 
1205         split variables.  Refactored some code to ensure that callbacks get
1206         invoked when appropriate.
1207
1208         * procedure.c (proc_cancel_temporary_transformations): Make sure that 
1209         replace_dict callback occurs when permanent_dict replaces the current
1210         dictionary.
1211
1212 Wed Jan  3 11:02:11 WST 2007 John Darrington <john@darrington.wattle.id.au>
1213
1214         * dictionary.c dictionary.h : Added callback for when the weight 
1215         variable of a dictionary changes.
1216
1217 Mon Jan  1 10:36:26 WST 2007 John Darrington <john@darrington.wattle.id.au>
1218
1219         * dictionary.c dictionary.h : Added replace_source and replace_dict
1220         callbacks, and functions to deal with them.
1221
1222 Fri Dec 22 13:56:08 2006  Ben Pfaff  <blp@gnu.org>
1223
1224         Simplify missing value handling.
1225
1226         * missing-values.h (enum mv_class): New type.
1227         (enum mv_type): Moved definition into missing-values.c and renamed
1228         each MV_* to MVT_*, to distinguish them from the exposed mv_class
1229         enums.  Updated all uses.
1230         (struct missing_values): Changed type of `type' from `enum
1231         mv_type' to `int' because the definition is no longer exposed.
1232         
1233         * missing-values.c (mv_is_value_missing): Add new enum mv_class
1234         parameter.  Update all callers.
1235         (mv_is_num_missing): Ditto.
1236         (mv_is_str_missing): Ditto.
1237         (mv_is_value_user_missing): Removed.  Changed callers to use
1238         mv_is_value_missing.
1239         (mv_is_num_user_missing): Removed.  Changed callers to use
1240         mv_is_num_missing.
1241         (mv_is_str_user_missing): Removed.  Changed callers to use
1242         mv_is_str_missing.
1243         (mv_is_value_system_missing): Removed.  Changed callers to use
1244         mv_is_value_missing.
1245         (mv_set_type): Removed.  Changed callers to use mv_clear.
1246         (mv_clear): New function.
1247         
1248         * variable.c (var_is_value_missing): Add new enum mv_class
1249         parameter.  Update all callers.
1250         (var_is_num_missing): Ditto.
1251         (var_is_str_missing): Ditto.
1252         (var_is_value_user_missing): Removed.  Changed callers to use
1253         var_is_value_missing.
1254         (var_is_num_user_missing): Removed.  Changed callers to use
1255         var_is_num_missing.
1256         (var_is_str_user_missing): Removed.  Changed callers to use
1257         var_is_str_missing.
1258         (var_is_value_system_missing): Removed.  Changed callers to use
1259         var_is_value_missing.
1260         
1261         * casefilter.c (struct casefilter): Use enum mv_class in place of
1262         bool.
1263         (casefilter_variable_missing): Adapt to new member.
1264         (casefilter_create): Change signature to take enum mv_class,
1265         update callers.
1266
1267 Fri Dec 22 20:08:38 WST 2006 John Darrington <john@darrington.wattle.id.au>
1268
1269         * casefile-factory.h fastfile-factory.c fastfile-factory.h: New files.
1270
1271         * case-sink.c case-sink.h procedure.c procedure.h 
1272           storage-stream.c: Now uses the factory.
1273         
1274 Sat Dec 16 22:05:18 2006  Ben Pfaff  <blp@gnu.org>
1275
1276         Make it possible to pull cases from the active file with a
1277         function call, instead of requiring indirection through a callback
1278         function.
1279
1280         * case-source.h (struct case_source_class): Change ->read function
1281         to return a single case, instead of calling a callback function
1282         for each case.  Change ->destroy function to return an error
1283         status.
1284
1285         * case-source.c (free_case_source): Pass along the value returned
1286         by the case_source ->destroy function.
1287
1288         * procedure.c (struct write_case_data): Removed.
1289         (struct dataset): Added some members to track procedure state.
1290         (procedure): Optimize the trivial case at this level.
1291         (internal_procedure): Re-implement in terms of proc_open,
1292         proc_read, proc_close.
1293         (proc_open) New function.
1294         (proc_read) New function.
1295         (proc_close) New function.
1296         (write_case) Moved into proc_read.
1297         (close_active_file) Moved closing of data source into proc_close.
1298
1299         * storage-source.c: Rewrote to conform with modified
1300         case_source_class interface.
1301
1302         * transformations.c (trns_chain_execute): Added argument to allow
1303         starting execution from an arbitrary transformation.  Updated
1304         callers.
1305
1306         * transformations.h (enum TRNS_NEXT_CASE) Renamed TRNS_END_CASE.
1307
1308 Sat Dec 16 14:09:25 2006  Ben Pfaff  <blp@gnu.org>
1309
1310         * sys-file-reader.c (read_display_parameters): Don't assume that
1311         MEASURE_* and ALIGN_* have the same values found in system files.
1312
1313         * sys-file-writer.c (write_variable_display_parameters): Ditto.
1314
1315         * variable.h: Change MEASURE_NOMINAL, MEASURE_ORDINAL,
1316         MEASURE_SCALE to be 0-based instead of 1-based.  This also fixes
1317         the value of n_MEASURES, which was off by 1 (at least from my
1318         point of view).
1319
1320 Sat Dec 16 12:17:34 WST 2006 John Darrington <john@darrington.wattle.id.au>
1321
1322         * dictionary.c dictionary.h vardict.h variable.c: Added optional
1323                 callbacks which are invoked when the dictionary or its 
1324                 variables are changed.  
1325         
1326         * missing-values.c missing-values.h value-labels.c: Tidied up
1327                 consistency checks, and made some of them return false 
1328                 instead of assert-failing. 
1329
1330 Wed Dec 13 19:30:11 2006  Ben Pfaff  <blp@gnu.org>
1331
1332         * calendar.c (calendar_days_in_month): New function.
1333
1334 Mon Dec 11 07:53:39 2006  Ben Pfaff  <blp@gnu.org>
1335
1336         * value-labels.c (hash_int_val_lab): Only hash as many bytes as
1337         the value label's width.
1338
1339 Sun Dec 10 14:21:29 2006  Ben Pfaff  <blp@gnu.org>
1340
1341         * sfm-private.h: Move contents into sys-file-writer.c, which is
1342         the only remaining user.  Removed Borland C++-specific directives.
1343         
1344         * sys-file-reader.c: Clean up and rewrite entire file.  The
1345         rewritten version is simpler and better abstracted, and should be
1346         easier to maintain and extend.  It avoids using structures to read
1347         file data, which is prone to padding variations among compilers.
1348         It should also handle non-IEEE 754 system files, although I
1349         haven't been able to find any.  It has been tested against many
1350         .sav files obtained from the Web and found to produce the same
1351         results as the earlier version of the code, or in some cases
1352         improved results.  It is more tolerant of format variations found
1353         in the wild.
1354
1355         * sys-file-reader.h (struct sfm_read_info): Removed `big_endian'
1356         member, putting an enum integer_format in its place.  New member
1357         `float_format'.  Changed `compressed' member to type bool.
1358
1359 Sun Dec 10 13:48:53 2006  Ben Pfaff  <blp@gnu.org>
1360
1361         * dictionary.c (dict_delete_consecutive_vars): New function.
1362
1363 Sat Dec  9 20:08:25 2006  Ben Pfaff  <blp@gnu.org>
1364
1365         * file-name.c (fn_search_path): Remove prefix arg that was unused
1366         by any caller.  Updated all callers.
1367
1368 Sat Dec  9 20:04:22 2006  Ben Pfaff  <blp@gnu.org>
1369
1370         * format.c (fmt_dollar_template): Use user's decimal point
1371         character.  Add assertion.
1372
1373 Sat Dec  9 20:02:25 2006  Ben Pfaff  <blp@gnu.org>
1374
1375         * format.c (fmt_dollar_template): New function, based on
1376         dollar_format_template from var-type-dialog.c.
1377
1378 Sat Dec  9 18:05:59 2006  Ben Pfaff  <blp@gnu.org>
1379
1380         * data-out.c (output_scientific): Fix bad assumption that "buf" is
1381         null-terminated.
1382         
1383 Sat Dec  9 17:23:23 2006  Ben Pfaff  <blp@gnu.org>
1384
1385         Finish converting struct variable to an opaque type.  In this
1386         phase, we add remaining setter and getter functions, convert the
1387         remaining PSPP code to use them, and do a bunch of cleanup.  The
1388         resulting changes are pervasive but mostly trivial, and only the
1389         notable changes are logged.
1390         
1391         * automake.mk (src_data_libdata_a_SOURCES): Add the new source
1392         files.
1393         
1394         * case.c (case_data): Renamed case_data_idx.
1395         (case_num): Renamed case_num_idx.
1396         (case_str): Renamed case_str_idx.
1397         (case_data_rw): Renamed case_data_rw_idx.
1398
1399         * case.h (case_data): New function with old name and an interface
1400         that takes a variable instead of an index, which is easier to
1401         use.  Updated all callers to use the new interface, or to use the
1402         new *_idx function (see above).
1403         (case_num): Ditto.
1404         (case_str): Ditto.
1405         (case_data_rw): Ditto.
1406         
1407         * category.c (cat_stored_values_destroy): Changed interface to
1408         take a struct cat_vals * instead of a struct variable *.
1409
1410         * dictionary.c (dict_clone): Use new vector_clone function.     
1411         (dict_clear) Use new var_destroy function.
1412         (add_var) New function.
1413         (dict_create_var) Rewrite in terms of dict_create_var_assert.
1414         (dict_create_var_assert) Rewrite in terms of add_var.
1415         (dict_clone_var) Rewrite in terms of dict_clone_var_assert.
1416         (dict_clone_var_assert) Rewrite in terms of var_clone, add_var.
1417         (dict_lookup_var) Use new var_create, var_destroy functions.
1418         (dict_contains_var) Rewrite in terms of new vardict functionality.
1419         (set_var_dict_index) New function.
1420         (set_var_case_index) New function.
1421         (reindex_vars) New function.
1422         (dict_delete_var) Rewrite in terms of new vardict functionality.
1423         (dict_reorder_var) Ditto.
1424         (dict_reorder_vars) Ditto.
1425         (rename_var) New function.
1426         (dict_rename_var) Use rename_var.
1427         (dict_rename_vars) Use pool to simplify code.  Use rename_var.
1428         (dict_get_compacted_idx_to_fv) Rename
1429         dict_get_compacted_dict_index_to_case_index, update callers.
1430         (dict_create_vector) Use new vector_create function.
1431         (dict_clear_vectors) Use new vector_destroy function.
1432         (set_var_short_name_suffix) Move here from variable.c, renamed
1433         from var_set_short_name_suffix, make static, update caller.
1434
1435         * sys-file-private.c: New file.  
1436         (sfm_width_to_bytes) Moved here from variable.c, renamed from
1437         width_to_bytes, update callers.
1438
1439         * sys-file-private.h: New file.  Later it will supplant
1440         sfm-private.h; for now it supplements it.
1441         (macro MIN_VERY_LONG_STRING) New macro.
1442         (macro EFFECTIVE_LONG_STRING_LENGTH) New macro, from value.h.
1443
1444         * sys-file-reader.c: Use MIN_VERY_LONG_STRING - 1 where
1445         MAX_LONG_STRING was used before.
1446
1447         * sys-file-writer.c: Ditto.
1448
1449         * value-labels.c: Change the paradigm here to be that a null
1450         pointer is OK for a struct val_labs * in most cases; it just
1451         represents an empty set of value labels.
1452         (val_labs_copy) A copy of a null set is a null set.
1453         (val_labs_count) A null set has 0 labels.
1454         (val_labs_replace) Change return type to void.  Rewrite for
1455         simplicity.
1456         (val_labs_find) A null set does not contain the value.
1457         (value_to_string) Moved to variable.c, renamed var_get_value_name,
1458         transposed argument order, updated all callers.
1459
1460         * value.c: New file.
1461         (value_dup) Moved here from variable.c.
1462         (compare_values) Ditto.
1463         (hash_value) Ditto.
1464
1465         * value.h: (macro MAX_SHORT_STRING) Rewrote for simplicity.
1466         (macro MAX_LONG_STRING) Removed, because it was only interesting
1467         for system files, not for general code.
1468         (macro MAX_VERY_LONG_STRING) Ditto.
1469         (macro EFFECTIVE_LONG_STRING_LENGTH) Moved to sys-file-private.h.
1470         (macro MAX_ELEMS_PER_VALUE) Removed, as it was unused.
1471
1472         * vardict.h: New file, for an interface between variables and
1473         their dictionaries.
1474
1475         * variable.c: A lot of functions were moved around, for better
1476         organization.
1477         (struct variable) Move definition here, from variable.h.
1478         (var_type_adj) Removed--makes i18n hard.
1479         (var_type_noun) Ditto.
1480         (var_create) New function.
1481         (var_clone) New function.
1482         (var_destroy) New function.
1483         (var_set_name) Assert that variable is not in a dictionary.
1484         (compare_var_names) Rename compare_vars_by_name and fix a couple
1485         of callers who thought the args were strings.
1486         (hash_var_name) Rename hash_var_by_name.
1487         (compare_var_ptr_names) Rename compare_var_ptrs_by_name.
1488         (hash_var_ptr_name) Rename hash_var_ptr_by_name.
1489         (var_is_very_long_string) Removed, because it was only interesting
1490         to system file code.
1491         (var_set_missing_values) Allow the argument to be the wrong width,
1492         as long as we can resize it.  Simplify callers who were doing the
1493         resizing themselves.
1494         (var_get_value_labels) New function.
1495         (var_has_value_labels) New function.
1496         (var_set_value_labels) New function.
1497         (alloc_value_labels) New function.
1498         (var_add_value_label) New function.
1499         (var_replace_value_label) New function.
1500         (var_clear_value_labels) New function.
1501         (var_lookup_value_label) New function.
1502         (var_get_value_name) Moved here from variable.c, renamed from
1503         var_get_value_name, transposed argument order, updated all
1504         callers.
1505         (var_to_string) Moved here, from variable-label.c.
1506         (var_set_leave) New function.
1507         (var_get_leave) New function.
1508         (var_must_leave) New function.
1509         (var_set_short_name_suffix) Moved to dictionary.c, renamed
1510         set_var_short_name_suffix.
1511         (var_get_dict_index) New function.
1512         (var_get_case_index) New function.
1513         (var_get_obs_vals) New function.
1514         (var_set_obs_vals) New function.
1515         (var_has_obs_vals) New function.
1516         (var_get_vardict) New function.
1517         (var_set_vardict) New function.
1518         (var_has_vardict) New function.
1519         (var_clear_vardict) New function.
1520         (value_dup) Moved to value.c.
1521         (compare_values) Ditto.
1522         (hash_value) Ditto.
1523
1524         * variable.h: (enum NUMERIC) Rename VAR_NUMERIC, update all users.
1525         (enum ALPHA) Rename VAR_STRING, update all users.
1526
1527         * vector.c: New file.
1528         (struct vector) Moved here, from variable.h.
1529         (check_widths) New function.
1530         (vector_create) New function.
1531         (vector_clone) New function.
1532         (vector_destroy) New function.
1533         (vector_get_name) New function.
1534         (vector_get_var) New function.
1535         (vector_get_var_cnt) New function.
1536         (compare_vector_ptrs_by_name) New function.
1537
1538         * vector.h: New file.
1539
1540 Sun Dec 10 11:32:56 WST 2006 John Darrington <john@darrington.wattle.id.au>
1541
1542         * casefilter.c (casefilter_variable_missing): Avoided comparision of
1543         string variables to SYSMIS.  Thanks to Ben Pfaff for reporting this
1544         problem.
1545
1546 Sat Dec  9 07:18:03 WST 2006 John Darrington <john@darrington.wattle.id.au>
1547
1548         * value-labels.c (destroy_atoms): New function.
1549         * value-labels.c (atom_create): Call destroy_atoms in atexit handler.
1550
1551 Thu Dec  7 17:38:26 2006  Ben Pfaff  <blp@gnu.org>
1552
1553         Thanks to Jason Stover for pointing out this problem.
1554         
1555         * data-out.c (output_number): Use gsl_finite from GSL, which is
1556         portable, instead of isfinite, which is not.
1557         (power256) Ditto.
1558
1559 Thu Dec  7 15:22:38 WST 2006 John Darrington <john@darrington.wattle.id.au>
1560
1561         * variable.c variable.h (value_dup): New function.
1562
1563 Mon Dec  4 22:20:17 2006  Ben Pfaff  <blp@gnu.org>
1564
1565         Start converting struct variable to an opaque type.  In this
1566         phase, we add a bunch of setter and getter functions and convert
1567         most of the PSPP code to use them.  The resulting changes are
1568         pervasive but mostly trivial, and only the notable changes are
1569         logged.
1570         
1571         * format.c (fmt_equal): New function.
1572         
1573         * variable.c (var_type_is_valid): New function.
1574         (measure_is_valid) Moved here, from format.c.
1575         (alignment_is_valid) Moved here, from format.c.
1576         (var_get_name) New function.
1577         (var_set_name) New function.
1578         (width_to_type) New function.
1579         (var_get_type) New function.
1580         (var_get_width) New function.
1581         (var_set_width) New function.
1582         (var_is_numeric) New function.
1583         (var_is_alpha) New function.
1584         (var_is_short_string) New function.
1585         (var_is_long_string) New function.
1586         (var_is_very_long_string) New function.
1587         (var_get_missing_values) New function.
1588         (var_set_missing_values) New function.
1589         (var_clear_missing_values) New function.
1590         (var_has_missing_values) New function.
1591         (var_is_value_missing) New function.
1592         (var_is_num_missing) New function.
1593         (var_is_str_missing) New function.
1594         (var_is_value_user_missing) New function.
1595         (var_is_num_user_missing) New function.
1596         (var_is_str_user_missing) New function.
1597         (var_is_value_system_missing) New function.
1598         (var_get_print_format) New function.
1599         (var_set_print_format) New function.
1600         (var_get_write_format) New function.
1601         (var_set_write_format) New function.
1602         (var_set_both_formats) New function.
1603         (var_get_label) New function.
1604         (var_set_label) New function.
1605         (var_clear_label) New function.
1606         (var_has_label) New function.
1607         (var_get_measure) New function.
1608         (var_set_measure) New function.
1609         (var_get_display_width) New function.
1610         (var_set_display_width) New function.
1611         (var_get_alignment) New function.
1612         (var_set_alignment) New function.
1613         (var_get_value_cnt) New function.
1614         (var_get_leave) New function.
1615         (var_get_short_name) New function.
1616
1617         * variable.h: (struct variable) Removed "type" and "nv" members;
1618         they are now computed from "width" where needed.
1619
1620 Mon Dec  4 21:38:40 2006  Ben Pfaff  <blp@gnu.org>
1621
1622         * missing-values.c (mv_resize): Don't write beyond end of the
1623         allocated buffer when resizing a long string.
1624
1625 Sat Dec  2 16:28:32 2006  Ben Pfaff  <blp@gnu.org>
1626
1627         Clean up identifier code: don't require identifier enumerations to
1628         be in a particular order; make better use of string library;
1629         expose less of the internals.
1630                 
1631         * identifier.c: (lex_skip_identifier) Rename lex_id_get_length,
1632         change interface.  Updated all callers.
1633         (lex_id_match) Change interface to use struct substring, update
1634         all callers.
1635         (lex_id_match_len) Removed.  Update callers to use lex_id_match.
1636         (global array keywords[]) Make static, change form.  Update all
1637         users to use lex_id_name instead.
1638         (lex_is_keyword) New function.
1639         (lex_id_to_token) Change interface to use struct substring, update
1640         all callers.
1641         (lex_id_name) New function.
1642
1643         * identifier.h: (T_FIRST_KEYWORD) Removed.  Changed users to call
1644         lex_is_keyword instead.
1645         (T_LAST_KEYWORD) Removed.
1646         (T_N_KEYWORDS) Removed.
1647         
1648 Sat Nov 18 20:46:35 2006  Ben Pfaff  <blp@gnu.org>
1649
1650         * format.c: (fmt_date_template) Distinguish characters for which a
1651         space is output and any date delimiter is allowed on input, from
1652         those for which a space is output and only a space is allowed on
1653         input.  The former is represented by X, the latter by a space.
1654         Also, drop distinction between h and H, changing the former to the
1655         latter.
1656
1657         * data-in.c: Completely rewrite internals to conform to SPSS input
1658         formats as closely as possible.
1659         (data_in) Changed external interface by replacing the structure
1660         that was used as a single argument by a set of arguments.  Updated
1661         all callers.
1662         (data_in_finite_line) Removed.  Converted all callers to use plain
1663         data_in.
1664         (data_in_get_integer_format) New function.
1665         (data_in_set_integer_format) New function.
1666         (data_in_get_float_format) New function.
1667         (data_in_set_float_format) New function.
1668
1669         * data-in.h: (enums DI_IGNORE_ERROR, DI_IMPLIED_DECIMALS) Removed.
1670         (struct data_in) Removed.
1671
1672         * data-out.c: (output_date) Drop each component from the input as
1673         it is output, to allow us to drop the distinction between h (a
1674         count of hours) and H (the hour of day) template characters.
1675         Also, handle new X template character.
1676         (output_scientific) Follow more rational rule on when to drop
1677         fraction introduced between SPSS 13 and 15.  Updated test case to
1678         match new behavior.
1679
1680 Sat Nov 11 11:41:26 2006  Ben Pfaff  <blp@gnu.org>
1681
1682         Fix buffer overflow reported by John Darrington.
1683
1684         * data-out.c (output_bcd_integer): In case of SYSMIS, etc.,
1685         realize that DIGITS is a count of nibbles, not of bytes.
1686
1687 Sat Nov  4 15:59:56 2006  Ben Pfaff  <blp@gnu.org>
1688
1689         * calendar.c (calendar_offset_to_gregorian) Also return the
1690         year-of-day.  Change callers to new interface.
1691
1692         * data-out.c: Completely rewrite internals to conform to SPSS
1693         output formats as completely as possible.
1694         (data_out) Change interface to put input parameters before output
1695         parameters, for consistency with the style I now prefer.  Update
1696         all callers.
1697         (data_out_get_integer_format) New public function.
1698         (data_out_set_integer_format) New public function.
1699         (data_out_get_float_format) New public function.
1700         (data_out_set_float_format) New public function.
1701
1702         * data-out.h: New file.  Move prototype for data_out here, from
1703         format.h.
1704
1705         * format.c: (fmt_step_width) Use equality comparison instead of
1706         bitwise and, for clarity.
1707         (fmt_is_string) Ditto.
1708         (fmt_input_to_output) Fix categories that are translated to F
1709         format.
1710
1711 Sun Nov  5 08:29:34 WST 2006 John Darrington <john@darrington.wattle.id.au>
1712
1713         * casefilter.c casefilter.h (new files), casefile.c casefile.h 
1714         casefile-private.h: Added casefilter to assist commands with missing 
1715         values.
1716
1717 Sat Nov  4 11:47:09 2006  Ben Pfaff  <blp@gnu.org>
1718
1719         Implement SET ERRORS, SHOW ERRORS.  Fixes bug #17609.
1720         
1721         * settings.c: (route_errors_to_terminal) New variable.
1722         (route_errors_to_listing) New variable. 
1723         (get_error_routing_to_terminal) New function.
1724         (set_error_routing_to_terminal) New function.
1725         (get_error_routing_to_listing) New function.
1726         (set_error_routing_to_listing) New function.
1727
1728         * settings.h: (SET_ROUTE_* enums) Removed, because unused.
1729
1730 Tue Oct 31 19:58:27 2006  Ben Pfaff  <blp@gnu.org>
1731
1732         * format.c: Completely rewrite, to achieve better abstraction.
1733         Rewrite all references to formats in other files.
1734         
1735         * format.def: Rewrite and reorganize.
1736
1737         * settings.c: Move everything related to custom currency formats
1738         into format.[ch], changing them in form, so as to group related
1739         code and definitions better.  Changed all references to use the
1740         new functions.
1741         (static var decimal) Removed.
1742         (static var grouping) Removed.
1743         (static var cc) Removed.
1744         (get_decimal) Removed.
1745         (set_decimal) Removed.
1746         (get_grouping) Removed.
1747         (set_grouping) Removed.
1748         (get_cc) Removed.
1749         (set_cc) Removed.
1750
1751         * settings.h: (macro CC_CNT) Removed.
1752         (macro CC_WIDTH) Removed.
1753         (struct custom_currency) Removed.
1754
1755 Tue Oct 31 19:56:19 2006  Ben Pfaff  <blp@gnu.org>
1756
1757         * data-in.c (data_in): Use switch statement instead of table, to
1758         avoid dependence on the order of the FMT_* enums.
1759
1760 Tue Oct 31 19:35:36 2006  Ben Pfaff  <blp@gnu.org>
1761
1762         * data-out.c: (num_to_string) Removed, because it was dead code.
1763
1764 Tue Oct 31 18:09:24 2006  Ben Pfaff  <blp@gnu.org>
1765
1766         * data-in.c (parse_trailer): Fix error message.
1767
1768 Sat Oct 28 11:56:50 2006  Ben Pfaff  <blp@gnu.org>
1769
1770         * format.c (fmt_is_binary): New function.
1771
1772 Thu Oct 19 22:59:56 WST 2006 John Darrington <john@darrington.wattle.id.au>
1773
1774         * procedure.c procedure.h: Encapsulated the static data into a single
1775         struct.  
1776
1777 Sat Oct 14 16:56:44 2006  Ben Pfaff  <blp@gnu.org>
1778
1779         * casefile.c (casereader_read_xfer): Always initialize the case,
1780         even on an error condition.
1781
1782 Wed Sep 27 09:37:49 WST 2006 John Darrington <john@darrington.wattle.id.au>
1783
1784         * procedure.c (case_limit_trns_proc): Fixed buglet which rendered the 
1785         entire function useless.
1786
1787 Mon Sep 25 17:11:46 WST 2006 John Darrington <john@darrington.wattle.id.au>
1788
1789         * casefile-private.h casefile.c casefile.h fastfile.c: Created new
1790         casereader method casereader_clone.   
1791         
1792         * procedure.c pransformations.h: Introduced new type casenum_t
1793
1794 Thu Sep 21 07:00:30 2006  Ben Pfaff  <blp@gnu.org>
1795
1796         * variable.c: (width_to_bytes) Rephrase code for clarify.
1797
1798 Sun Jul 16 19:52:03 2006  Ben Pfaff  <blp@gnu.org>
1799
1800         * format.c: (fmt_type_from_string) New function.
1801         (fmt_to_string) Include decimals in output if the format has
1802         decimals, even if the format type does not.  This way, we can
1803         accurately reproduce incorrect formats in user output.
1804         (check_common_specifier) Make the check for a bad format type an
1805         assertion, so we get bug reports if they show up.  Fix message.
1806         Check for decimal places with a format type that doesn't allow
1807         them.
1808         (check_input_specifier) Remove check for FMT_X, which has been
1809         deleted.
1810         (check_output_specifier) Ditto. 
1811
1812         * format.def: Remove FMT_T, FMT_X, FMT_DESCEND, FMT_NEWREC.
1813
1814         * format.h: (macro FMT_TYPE_LEN_MAX) New macro.
1815         (struct fmt_desc) Use FMT_TYPE_LEN_MAX in definition.
1816         (enum fmt_parse_flags) Removed.
1817
1818 Mon Jul 17 18:26:21 WST 2006 John Darrington <john@darrington.wattle.id.au>
1819
1820         * casefile.c casefile.h: Converted to  an abstract base class.
1821         * casefile-private.h fastfile.c fastfile.h: New files.
1822         * automake.mk procedure.c scratch-writer.c storage-stream.c
1823
1824 Wed Jul 12 21:02:26 2006  Ben Pfaff  <blp@gnu.org>
1825
1826         * procedure.c (internal_procedure): Create sink_case with only as
1827         many values as the compacted dictionary.
1828
1829 Wed Jul 12 21:01:00 2006  Ben Pfaff  <blp@gnu.org>
1830
1831         Remove "debugging" code that caused plenty of false positives and
1832         no true positives.
1833         
1834         * case.h (struct ccase): [DEBUGGING] Remove `this' member.
1835
1836         * case.c: Remove all references to `this' member.
1837
1838 Thu Jul  6 19:09:53 2006  Ben Pfaff  <blp@gnu.org>
1839
1840         Fix link error noted by Jason Stover.
1841         
1842         * storage-stream.c: Include <assert.h>.
1843
1844 Tue Jul  4 08:47:35 2006  Ben Pfaff  <blp@gnu.org>
1845
1846         Fix bug #15766 (/KEEP subcommand on SAVE doesn't fully support
1847         ALL) and additional underlying system file issues.
1848
1849         Thanks to John Darrington for review.
1850
1851         First problem: var_hash points to variables not owned by the
1852         sys-file-reader, which the caller may free or modify.  Use an
1853         array of sfm_vars instead, as done earlier (e.g. CVS version
1854         1.12).
1855         
1856         * sys-file-reader.c (struct sfm_reader): Remove var_hash, svars
1857         members and remove all code that references it.  Add vars, var_cnt
1858         members.  Remove fix_specials member, which was unused.
1859         (struct sfm_var) Remove name member, which was unused.
1860         (sfm_close_reader) Free vars member instead of var_hash.
1861         (compare_var_shortnames) Removed.
1862         (hash_var_shortname) Removed.
1863         (sfm_open_reader) Fill out vars array.
1864         (compare_var_index) Removed.
1865         (sfm_read_case) Use vars instead of var_hash.
1866         
1867         Second problem: we're confused about when we actually have very
1868         long strings, causing us to choose incorrectly between slow path
1869         and fast path in sfm_read_case.
1870
1871         * sys-file-reader.c: (sfm_open_reader) Only mark has_vls if we
1872         have very long strings, not when we have long variable names,
1873         which is an unrelated feature.
1874
1875 Tue Jun 27 12:06:49 2006  Ben Pfaff  <blp@gnu.org>
1876
1877         * variable.h: Move var_set and variable parsing declarations to
1878         new header, src/language/lexer/variable-parser.h.  Modified lots
1879         of files to include the new header.
1880
1881 Sun Jun 25 22:39:32 2006  Ben Pfaff  <blp@gnu.org>
1882
1883         * value-labels.c (value_to_string): When there's no value label,
1884         format the variable according to its print format, instead of
1885         always effectively using A or F format.
1886
1887 Mon Jun 19 18:05:42 WST 2006 John Darrington <john@darrington.wattle.id.au>
1888
1889         * casefile.c (casefile_get_random_reader): Nasty hack to get around 
1890         the mode assertion.
1891
1892         * format.c: Removed tortological assertion.
1893
1894 Fri Jun  9 12:20:09 2006  Ben Pfaff  <blp@gnu.org>
1895
1896         Reform string library.
1897         
1898         * file-name.c (fn_interp_vars): Change interface to take a
1899         substring as input.  Updated all users.
1900         
1901 Fri Jun  9 12:11:24 2006  Ben Pfaff  <blp@gnu.org>
1902
1903         * format.c (measure_is_valid): Really return false when m >=
1904         n_MEASURES.
1905
1906 Tue Jun  6 18:46:26 2006  Ben Pfaff  <blp@gnu.org>
1907
1908         Implement random access to casefiles, for use in GUI.
1909         
1910         * casefile.c: (struct casereader) Add `random', `file_ofs',
1911         `buffer_ofs' members.
1912         (casefile_get_random_reader) New function.
1913         (read_open_file) Break part into new function
1914         seek_and_fill_buffer().
1915         (fill_buffer) Update buffer_ofs, file_ofs.
1916         (casereader_seek) New function.
1917
1918 Tue May 30 19:52:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
1919
1920         * settings.c: Added call to i18n{done, init}.
1921
1922 Tue May  9 21:09:17 2006  Ben Pfaff  <blp@gnu.org>
1923
1924         * procedure.h: Add WARN_UNUSED_RESULT to procedure function
1925         prototypes.
1926
1927 Tue May  9 21:08:05 2006  Ben Pfaff  <blp@gnu.org>
1928
1929         * casefile.c: Convert many uses of `int' to `bool'.
1930
1931 Sat May  6 22:49:43 2006  Ben Pfaff  <blp@gnu.org>
1932
1933         * transformations.c (trns_chain_destroy): Destroy chain's trns
1934         member, to fix memory leak.
1935
1936 Sat May  6 22:48:30 2006  Ben Pfaff  <blp@gnu.org>
1937
1938         * storage-stream.c (storage_source_decapsulate): Destroy case
1939         source to fix memory leak.
1940
1941 Sat May  6 22:46:47 2006  Ben Pfaff  <blp@gnu.org>
1942
1943         * scratch-reader.c (scratch_reader_read_case): Copy into existing
1944         case passed as argument instead of initializing the argument as a
1945         case.  Fixes memory leak that showed up in
1946         tests/command/aggregate.sh with scratch files.
1947
1948 Sat May  6 22:45:55 2006  Ben Pfaff  <blp@gnu.org>
1949
1950         * procedure.c (proc_done): Destroy default_dict, to fix memory
1951         leak.
1952
1953 Sat May  6 22:44:44 2006  Ben Pfaff  <blp@gnu.org>
1954
1955         Simplify procedure_with_splits().
1956         
1957         * procedure.c (struct split_aux_data): Removed case_count member.
1958         (procedure_with_splits) Don't initialize case_count.
1959         (split_procedure_case_func) Check whether prev_case is null
1960         instead of case_count.
1961         (split_procedure_end_func) Ditto.
1962
1963 Sat May  6 22:42:23 2006  Ben Pfaff  <blp@gnu.org>
1964
1965         * case.c (case_move): Do nothing if dst and src are the same
1966         object.
1967         (case_try_create) Merge two similar cases.
1968         (case_copy) Unshare only if data must be actually copied.
1969
1970 Sun May  7 10:04:06 WST 2006 John Darrington <john@darrington.wattle.id.au>
1971
1972         * data-in.c data-out.c dictionary.c sys-file-reader.c
1973         sys-file-writer.c variable.c variable.h:  Reworked very long string
1974         support for better encapsulation.
1975
1976 Sat May  6 19:02:00 2006  Ben Pfaff  <blp@gnu.org>
1977
1978         * value-labels.c (val_labs_can_set_width): New function.
1979         (val_labs_set_width) Clear labels if increasing width to long
1980         string.
1981         (val_labs_destroy) Remove unneeded test for null.
1982         
1983 Sat May  6 16:14:08 2006  Ben Pfaff  <blp@gnu.org>
1984
1985         * value-labels.h: Remove unneeded dependency on variable.h.
1986
1987 Sat May  6 15:58:36 2006  Ben Pfaff  <blp@gnu.org>
1988
1989         Get rid of `char *c' member in union value, for cleanliness.
1990         
1991         * value.h: (union value) Remove `c' member.
1992
1993 Sat May  6 15:36:59 2006  Ben Pfaff  <blp@gnu.org>
1994
1995         Make dictionary compacting functions a little more general.
1996         
1997         * sys-file-writer.c (sfm_open_writer): Use
1998         dict_compacting_would_change().
1999         (does_dict_need_translation) Removed.
2000
2001 Sat May  6 15:35:42 2006  Ben Pfaff  <blp@gnu.org>
2002
2003         Make dictionary compacting functions a little more general.
2004         
2005         * dictionary.c (dict_needs_compaction): Rename
2006         dict_compacting_would_shrink().  Update all callers.
2007         (dict_compacting_would_change) New function.
2008         
2009 Sat May  6 14:25:49 2006  Ben Pfaff  <blp@gnu.org>
2010
2011         * sys-file-writer.c: (does_dict_need_translation) Fix bug:
2012         inverted return value (!).
2013
2014 Sat May  6 13:37:52 2006  Ben Pfaff  <blp@gnu.org>
2015
2016         Continue reforming procedure execution.  
2017
2018         * procedure.c: Search and replace "vfm" by "proc".  Notably:
2019         (static var vfm_source) Rename proc_source.  Update all
2020         references.
2021         (static var vfm_sink) Rename proc_sink.  Update all references.
2022         
2023 Sat May  6 12:38:55 2006  Ben Pfaff  <blp@gnu.org>
2024
2025         Continue reforming procedure execution.  In this phase, remove
2026         PROCESS IF, which was deprecated anyway and can be easily
2027         simulated with TEMPORARY followed by SELECT IF.
2028
2029         * procedure.c: (open_active_file) Don't call
2030         add_process_if_trns().
2031         (discard_variables) Get rid of redundant call to
2032         proc_cancel_all_transformations().
2033         (add_process_if_trns) Removed.
2034         (process_if_trns_proc) Removed.
2035         (process_if_trns_free) Removed.
2036
2037 Sat May  6 10:58:05 2006  Ben Pfaff  <blp@gnu.org>
2038
2039         Continue reforming procedure execution.  In this phase, add
2040         `const' to the case passed to procedure()'s callback.
2041
2042         Updated all users of procedure() as well.
2043         
2044         * procedure.c: (struct write_case_data) Add "const" to ccase
2045         parameter for case_func member.
2046         (procedure) Add "const" to ccase parameter for proc_func
2047         parameter.
2048         (multipass_case_func) Make ccase parameter const.
2049         (internal_procedure) Add "const" to ccase parameter for case_func
2050         parameter.
2051         (split_procedure_case_func) Make ccase parameter const.
2052         (multipass_split_case_func) Make ccase parameter const.
2053         
2054 Sat May  6 10:30:33 2006  Ben Pfaff  <blp@gnu.org>
2055
2056         Continue reforming procedure execution.  In this phase, get rid of
2057         the output code for SPLIT FILE groups in procedure.c, which really
2058         shouldn't be doing any output.  Move it into the individual
2059         procedures instead.  This also adds some flexibility.
2060
2061         Updated many users of procedure_with_splits() and
2062         multipass_procedure_with_splits() to call
2063         output_split_file_values() and to deal with increased use of
2064         const.
2065
2066         * procedure.c: (struct split_aux_data) Add "const struct ccase *"
2067         parameter to begin_func member.
2068         (procedure_with_splits) Add "const struct ccase *" parameter to
2069         begin_func parameter.  Make ccase parameter const in proc_func
2070         parameter.
2071         (split_procedure_case_func) Don't dump split file group.  Pass
2072         case to begin_func.
2073         (dump_splits) Moved to language/dictionary/split-file.c as
2074         output_split_file_values().
2075         (struct multipass_split_aux_data) Add "const struct ccase *"
2076         parameter to split_func member.
2077         (multipass_procedure_with_splits) Add "const struct ccase *"
2078         parameter to split_func parameter.
2079         (multipass_split_case_func) Save new SPLIT FILE case before
2080         outputting case.
2081         (multipass_split_output) Pass saved SPLIT FILE case to split_func.
2082         
2083 Fri May  5 22:48:50 2006  Ben Pfaff  <blp@gnu.org>
2084
2085         Continue reforming procedure execution.  Change
2086         internal_procedure() so that it calls open_active_file() and
2087         close_active_file(), which isolates most of the actual procedure
2088         functionality.
2089
2090         * procedure.c: (struct write_case_data) Rename `proc_func' member
2091         to `case_func' and update all references.
2092         (procedure) Rewrite as one-line wrapper around
2093         internal_procedure().
2094         (struct multipass_aux_data) New.
2095         (multipass_callback) Renamed multipass_case_func().  Use struct
2096         multipass_aux_data as auxiliary data.
2097         (multipass_end_func) New function.
2098         (multipass_procedure) Rewrite as wrapper for internal_procedure()
2099         that uses multipass_case_func, multipass_end_func.
2100         (internal_procedure) Add `end_func' argument.  Move optimization
2101         of trivial case in here.  Move call to open_active_file() and
2102         close_active_file() in here.  Now assert that vfm_source is
2103         non-null.
2104         (procedure_with_splits_callback) Rename
2105         split_procedure_case_func().
2106         (split_procedure_end_func) New function.
2107         (multipass_split_callback) Rename multipass_split_case_func.
2108         (multipass_split_end_func) New function.
2109         (discard_variables) No need to test for nonnull vfm_source.
2110
2111 Fri May  5 21:34:02 2006  Ben Pfaff  <blp@gnu.org>
2112
2113         Continue reforming procedure execution.  Get rid of unused member.
2114
2115         * procedure.c: (struct write_case_data) Remove `cases_analyzed'
2116         member.
2117         (write_case) Don't increment cases_analyzed.
2118
2119 Thu May  4 21:50:11 2006  Ben Pfaff  <blp@gnu.org>
2120
2121         Continue reforming procedure execution.  In this phase, move
2122         procedure.c and procedure.h from src to src/data.  Update
2123         makefiles and #includes accordingly.
2124
2125         * procedure.c: Moved here from src/.
2126
2127         * procedure.h: Moved here from src/.
2128
2129 Wed May  3 22:42:12 2006  Ben Pfaff  <blp@gnu.org>
2130
2131         Continue reforming procedure execution.  In this phase, get rid of
2132         many global variables, consolidating procedure execution in
2133         procedure.c.  Encapsulate transformations in new "struct
2134         trns_chain".  Also, change implementation of N OF CASES, FILTER,
2135         and PROCESS IF from special cases to transformations.
2136          
2137         * automake.mk: (src_data_libdata_a_SOURCES) Add transformations.c,
2138         transformations.h.
2139
2140         * dictionary.c: (global variable default_dict) Move to
2141         src/procedure.c.
2142
2143         * variable.h: (TRNS_*) Move to transformations.h.
2144         (struct transformation) Move to transformations.c.
2145
2146 Thu May  4 13:47:06 WST 2006 John Darrington <john@darrington.wattle.id.au>
2147
2148         * sys-file-reader.c: Fixed invalid read problems.
2149
2150 Tue May  2 15:57:10 2006  Ben Pfaff  <blp@gnu.org>
2151
2152         * storage-stream.c: Add missing function comments.
2153
2154 Tue May  2 15:50:21 2006  Ben Pfaff  <blp@gnu.org>
2155
2156         Continue reforming procedure execution.  In this phase, add some
2157         new, needed functionality to storage-stream.
2158
2159         * storage-stream.c: (storage_source_decapsulate) New function.
2160
2161 Tue May  2 15:43:36 2006  Ben Pfaff  <blp@gnu.org>
2162
2163         * variable.c (width_to_bytes): Declarations must precede
2164         statements for C90 compliance.
2165
2166 Tue May  2 10:42:05 WST 2006 John Darrington <john@darrington.wattle.id.au>
2167
2168         * data-out.c, data-in.c, variable.c, variable.h: New functions 
2169         copy_mangle and copy_demangle for reading/writing cases; emulates the 
2170         way SPSS deals with strings > 255 bytes.
2171
2172         * sys-file-reader.c sys-file-writer.c: Added support for Record 7, 
2173         subtype 14 needed for strings longer than 255 bytes.
2174
2175         * dictionary.c, format.def, value.c : Updated to use MAX_STRING 
2176         instead of literal values. Also fixed some constness issues.
2177
2178         * format.h: Constness
2179
2180         * sfm-private.h: Renamed the case_size identifier, since I discovered 
2181         that SPSS's respect for this variable is very nominal.
2182
2183 Mon May  1 15:45:42 2006  Ben Pfaff  <blp@gnu.org>
2184
2185         Change case limit type from int to size_t.
2186
2187         * dictionary.c: (struct dictionary) Change type of case_limit
2188         member.
2189         (dict_get_case_limit) Change return type.
2190         (dict_set_case_limit) Change parameter type.
2191
2192 Wed Apr 26 20:01:19 2006  Ben Pfaff  <blp@gnu.org>
2193
2194         * variable.h: (struct variable) Rename `reinit' member as `leave'
2195         and invert sense.  Fix up all references.
2196
2197 Wed Apr 26 19:39:28 2006  Ben Pfaff  <blp@gnu.org>
2198
2199         Continue reforming procedure execution.  In this phase, break
2200         procedure.c into multiple files.
2201         
2202         * automake.mk: (src_data_libdata_a_SOURCES) Add all the new files.
2203
2204         * case-sink.c: New file.
2205
2206         * case-sink.h: New file.
2207         
2208         * case-source.c: New file.
2209
2210         * case-source.h: New file.
2211         
2212         * storage-stream.c: New file.
2213
2214         * storage-stream.h: New file.
2215
2216 Wed Apr 26 14:55:19 2006  Ben Pfaff  <blp@gnu.org>
2217
2218         * variable.h: (struct variable) Remove `init' member and all
2219         references to it from other files.  It was initialized in several
2220         places, but nothing really ever used it for anything worthwhile.
2221         Thanks to Jason Stover for pointing out how confusing this
2222         member is.
2223
2224 Sun Apr 23 22:04:45 2006  Ben Pfaff  <blp@gnu.org>
2225
2226         Continue reforming error message support.  In this phase, get rid
2227         of message "titles" and put the message text in `struct error'.
2228         Now `struct error' encapsulates a message more properly.
2229         
2230         * casefile.c: (io_error) Use err_msg() instead of err_vmsg().
2231         Format message ourselves.
2232
2233         * data-in.c: (vdls_error) Ditto.
2234
2235         * por-file-reader.c: (error) Ditto.
2236
2237         * sys-file-reader.c: (corrupt_msg) Ditto.
2238
2239 Sun Apr 16 18:49:51 2006  Ben Pfaff  <blp@gnu.org>
2240
2241         GNU standards require "file name" instead of "filename" in
2242         documentation.  It's nice for our code to follow the convention
2243         too.
2244         
2245         * casefile.c: (struct casefile) Rename `filename' member to
2246         `file_name'.  Updated all references.
2247
2248         * file-name.c: [!unix] (struct file_identity) Rename
2249         normalized_filename member to normalized_file_name.  Updated all
2250         references.
2251
2252 Sun Apr 16 18:35:33 2006  Ben Pfaff  <blp@gnu.org>
2253
2254         We don't really support anything but Unix-like environments well,
2255         so we might as well de-obfuscate by writing directory and path
2256         separators explicitly.
2257
2258         * file-name.h: (macro DIR_SEPARATOR) Removed.  Changed all usages
2259         to just '/'.
2260         (macro PATH_SEPARATOR) Removed.  Changed all usages to just ':'.
2261         (macro DIR_SEPARATOR_STRING) Removed.  Changed all usages to just
2262         "/".
2263         (macro PATH_SEPARATOR_STRING) Removed.  Changed all usages to just
2264         ":"
2265
2266 Sun Apr 16 18:28:35 2006  Ben Pfaff  <blp@gnu.org>
2267
2268         GNU standards require "file name" instead of "filename" in
2269         documentation.  It's nice for our code to follow the convention
2270         too.
2271         
2272         * filename.c: Rename to file-name.c.
2273
2274         * filename.h: Rename to file-name.h.  Update all inclusions.
2275         Update header guards.
2276
2277         * automake.mk: Update file names.
2278
2279 Sun Apr 16 16:42:47 2006  Ben Pfaff  <blp@gnu.org>
2280
2281         * filename.c: (fn_dirname) Renamed fn_dir_name(), all references
2282         updated.
2283         (fn_basename) Removed (dead code).
2284         (fn_absolute_p) Renamed fn_is_absolute(), all references updated.
2285         (fn_special_p) Renamed fn_is_special(), all references updated.
2286         (fn_exists_p) Renamed fn_exists(), all references updated.
2287
2288 Sun Apr 16 16:33:58 2006  Ben Pfaff  <blp@gnu.org>
2289
2290         * filename.c: (fn_tilde_expand) Rewrite for cleaner code.  
2291         Also, now it only tilde-expands file names, not paths.
2292         (fn_search_path) Tilde-expand one directory at a time.
2293
2294 Sun Apr 16 16:28:06 2006  Ben Pfaff  <blp@gnu.org>
2295
2296         * filename.c: (fn_search_path) rewrite for cleaner code.  Also,
2297         get rid of non-Unixlike version of the code, which has probably
2298         never been tested.
2299         (fn_prepend_dir) Removed (dead code).
2300
2301         * filename.h: (macro DIR_SEPARATOR_STRING) New.
2302         (macro PATH_SEPARATOR_STRING) New.
2303 Sun Apr 16 16:05:28 2006  Ben Pfaff  <blp@gnu.org>
2304
2305         Continue reforming error message support.  In this phase, we get
2306         rid of VM() and the other msg() support for "verbosity", replacing
2307         it by a new function verbose_msg().
2308
2309         * filename.c: (fn_search_path) Use verbose_msg() instead of
2310         msg(VM(), ...).  
2311
2312 Sat Apr 15 19:53:19 2006  Ben Pfaff  <blp@gnu.org>
2313
2314         * sfm-private.h: Get rid of #defines after #error, which makes no
2315         sense.
2316
2317 Sat Apr 15 19:48:57 2006  Ben Pfaff  <blp@gnu.org>
2318
2319         Get rid of our own int32 type in favor of the standard int32_t
2320         type.
2321         
2322         * sfm-private.h: (int32 macro) Don't define this anymore.  Do
2323         include <stdint.h>.
2324
2325         * sys-file-reader.c: Use int32_t instead of int32 throughout.
2326         
2327         * sys-file-writer.c: Use int32_t instead of int32 throughout.
2328
2329 Sat Apr 15 19:36:47 2006  Ben Pfaff  <blp@gnu.org>
2330
2331         Remove ill-considered file routines that are no longer used.
2332         
2333         * filename.c: (fn_open_ext) Removed.
2334         (fn_close_ext) Removed.
2335
2336         * filename.h: (struct file_ext) Removed.
2337
2338 Mon Apr  3 13:22:39 2006  Ben Pfaff  <blp@gnu.org>
2339
2340         * variable.c (var_is_valid_name): Move declarations before code
2341         for C90 compliance.
2342
2343 Tue Apr  4 15:28:40 WST 2006 John Darrington <john@darrington.wattle.id.au>
2344
2345         * filename.ch (fn_interp_vars): Fixed small buglet.
2346
2347 Tue Mar 28 13:47:16 WST 2006 John Darrington <john@darrington.wattle.id.au>
2348         
2349         * filename.[ch] (fn_interp_vars): Changed the signature and semantics
2350         so as to modify the string inline.   Thus makeing it easier to
2351         destroy the results when no longer needed.
2352         
2353 2006-03-25  Jason Stover  <jhs@math.gcsu.edu>
2354
2355         * category.c (cat_stored_values_destroy): Fixed memory leak.
2356
2357 Fri Mar 24 18:15:41 2006  Ben Pfaff  <blp@gnu.org>
2358
2359         Add some missing frees.  Thanks to John Darrington for reporting
2360         these.
2361
2362         * any-writer.c (any_writer_close): Free writer.
2363
2364         * any-reader.c (any_reader_close): Free reader.
2365
2366 Mon Mar 20 16:33:53 2006  Ben Pfaff  <blp@gnu.org>
2367
2368         * por-file-reader.c: (error) Mark as NO_RETURN.
2369
2370 Sat Mar 11 15:06:07 WST 2006 John Darrington <john@darrington.wattle.id.au>
2371
2372         * settings.c: Changed default value of scompress to true.
2373
2374 Sat Mar  4 13:22:51 2006  Ben Pfaff  <blp@gnu.org>
2375
2376         * sfm-private.h: Include variable.h, to get SHORT_NAME_LEN.
2377
2378         * value.h: Remove check on MAX_SHORT_STRING, which I don't think
2379         really applies.
2380
2381         * variable.h: Move definition of SHORT_NAME_LEN, LONG_NAME_LEN
2382         here from pref.h.orig.
2383
2384 Sat Mar  4 12:50:48 WST 2006 John Darrington <john@darrington.wattle.id.au>
2385
2386         * sys-file-reader.c: Fixed bug reading compressed files.
2387
2388 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
2389
2390         * Numerous renames.  See src/ChangeLog for details.
2391         
2392         * Moved files from src directory