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