casenumber is defined in transformations.h, but case.h is a more
[pspp-builds.git] / src / data / ChangeLog
1 2007-06-06  Ben Pfaff  <blp@gnu.org>
2
3         The casenumber type is defined in transformations.h, but case.h is
4         a more sensible place.  Move it.
5
6         * case.h (CASENUMBER_MAX): New macro.
7         (typedef casenumber): Move here, from transformations.h.
8
9 2007-06-03  Ben Pfaff  <blp@gnu.org>
10
11         Slightly generalize case_to_values and case_from_values functions.
12
13         * case.c (case_to_values): Rename case_copy_out, change interface.
14         (case_from_values): Rename case_copy_in, change interface.
15
16         * fastfile.c (fastfilereader_get_next_case): Update caller.
17         (write_case_to_disk): Ditto.
18
19 2007-06-02  Ben Pfaff  <blp@gnu.org>
20
21         Clean up after a forgotten part of patch #5829.
22         
23         * casedeque.h: Remove unused file.
24
25         * automake.mk: Remove casedeque.h from sources.
26
27 2007-05-10  Jason Stover  <jhs@math.gcsu.edu>
28
29         * category.c: Removed redundant #include
30
31 2007-05-06  Ben Pfaff  <blp@gnu.org>
32
33         Abstract the documents within a dictionary a little better.
34         Thanks to John Darrington for suggestion, initial version, and
35         review.  Patch #5917.
36
37         * dictionary.c (struct dictionary): Change `documents' member from
38         char * to struct string.
39         (dict_clear): Destroy struct string.
40         (dict_get_documents): Convert struct string to char *.
41         (dict_set_documents): Set struct string.  Pad to 80-character
42         multiple.
43         (dict_clear_documents): New function.
44         (dict_add_document_line): New function.
45         (dict_get_document_line_cnt): New function.
46         (dict_get_document_line): New function.
47
48         * dictionary.h (macro DOC_LINE_LENGTH): New macro.
49
50         * sys-file-reader.c (read_documents): Use new document functions.
51
52 2007-04-19 John Darrington <john@darrington.wattle.id.au>
53
54         * sys-file-reader.c: When reading a system file which has no 
55         long name table, automatically create one where the long names 
56         are the lower case versions of the short names.
57         
58 2007-04-22  Ben Pfaff  <blp@gnu.org>
59
60         * dictionary.c (dict_set_split_vars): dict_destroy expects that
61         dict_clear will free most data related to the dictionary.
62         dict_clear does a decent job, except that dict_set_split_vars on
63         some systems won't actually free the dict's "split" member.
64         Instead, it'll allocate a 1-byte region.  Fix this.
65
66         * value.c (value_copy): New function.
67         (value_set_missing): Ditto.
68
69 2007-04-22 John Darrington <john@darrington.wattle.id.au>
70
71         * Deleted existing category.h and moved cat-routines.h into 
72         category.h  Encapsulated struct cat_vals better.
73
74 2007-04-19 John Darrington <john@darrington.wattle.id.au>
75
76         * sys-file-reader.c: When reading a system file which has no 
77         long name table, automatically create one where the long names 
78         are the lower case versions of the short names.
79         
80 2007-04-16 John Darrington <john@darrington.wattle.id.au>
81
82         * sys-file-reader.c: Some versions of Other Software seem to 
83         produce system files with string  variables' measure set to 
84         zero.  We'll assume these are supposed to be nominal variables.
85
86 2007-03-30  Ben Pfaff  <blp@gnu.org>
87
88         * procedure.c: Adapt to new deque data structure.
89
90 Mon Feb 19 10:53:21 2007  John McCabe-Dansted <gmatht@gmail.com>
91                           Ben Pfaff <blp@gnu.org>
92
93         * file-name.c: Mingw compatibility fixes.
94         (fn_search_path): Use ISSLASH instead of comparing against '/'
95         directly.
96         (fn_dir_name): Use dir_name from gnulib.
97         (fn_is_absolute): Use IS_ABSOLUTE_FILE_NAME from gnulib.
98         (fn_get_identity): Use GetFullPathName instead of canonicalize
99         from gnulib, because the latter does not fully support
100         Windows-style path names.  Use this implementation based on the
101         detected presence of Windows instead of the absence of Unix, since
102         the new implementation is Windows-specific.
103         (fn_compare_file_identities): In Windows implementation, compare
104         names case-insensitively.
105
106 Sun Feb 18 13:28:02 2007  Ben Pfaff  <blp@gnu.org>
107
108         * make-file.c: Don't include mkstemp.h, because gnulib now causes
109         <stdlib.h> to have the same effect.
110
111 Sun Feb 18 11:20:24 2007  Ben Pfaff  <blp@gnu.org>
112
113         * por-file-reader.c: Add missing _() around messages.
114
115 Sun Feb 11 20:44:13 2007  Ben Pfaff  <blp@gnu.org>
116
117         * make-file.c: Include "mkstemp.h", without which linking on
118         mingw32 fails.
119
120 Thu Feb  8 14:59:05 2007  Ben Pfaff  <blp@gnu.org>
121  
122         Reduce platform dependence.
123  
124         * file-name.c (fn_tilde_expand): Removed, and removed calls to it.
125         Everywhere we using this, we really should have just depended on
126         the shell to expand tildes.
127         (fn_search_path): Simplify, given that we don't do tilde expansion
128         any longer.
129         (fn_normalize): Removed.  Caller changed to use the canonicalize
130         module from gnulib.
131         (fn_get_cwd): Removed.  Only user was fn_normalize.
132         (fn_is_absolute): Really only test for absolute names.
133         (fn_is_special): Use pipe files if HAVE_POPEN, not if we're in
134         unix.
135         (fn_readlink): Removed, as it was only used fn_normalize.
136         (fn_exists): Assume the stat function is available; gnulib does.
137         (fn_open): Use pipe files if HAVE_POPEN, not if we're in unix.
138  
139 Sat Feb  3 21:52:17 2007  Ben Pfaff  <blp@gnu.org>
140
141         * dictionary.c (dict_create_vector_assert): New function.
142
143 Wed Feb  7 21:25:15 2007  Ben Pfaff  <blp@gnu.org>
144
145         * file-name.c (fn_normalize): Correct name of function
146         fn_is_special.  Thanks to John McCabe-Dansted <gmatht@gmail.com>
147         for pointing this out.
148
149 Thu Feb  1 16:53:37 2007  Ben Pfaff  <blp@gnu.org>
150
151         We are using a single member in struct file_handle, the "name"
152         field, for more than one purpose.  When it begins with '"', it's a
153         file name; otherwise, it's a token that can be used to identify
154         it.  When that assertion fires, it's because we searched for the
155         name case-sensitively as a file name (so that there was no match),
156         and then we try to insert it case-insensitively as a token, which
157         fails because duplicates aren't allowed.
158
159         Solution: break the two purposes into two separate fields.  This
160         fixes the problem and likely makes the code easier to read too.
161
162         Fixes bug #18922.  Thanks to John Darrington for bug report and
163         review.
164
165         * file-handle-def.c (struct file_handle): New `id' member.
166         (fh_from_name): Rename fh_from_id.  Update all callers.
167         (create_handle): New `id' parameter.  Update all callers.
168         (fh_create_file): Ditto.
169         (fh_get_id): New function.
170
171 Mon Jan 15 16:18:10 2007  Ben Pfaff  <blp@gnu.org>
172
173         * case.c (case_is_null): Change return type to bool.
174
175 Mon Jan 15 10:57:28 2007  Ben Pfaff  <blp@gnu.org>
176
177         Add debugging code.
178         
179         * case.c (case_clone) [DEBUGGING]: When debugging, don't use
180         reference counting to share data.  This makes it easy for
181         valgrind, etc. to find accesses to cases that have been destroyed
182         but have been kept around by another user's ref-count.  This often
183         happens when the data set is small enough to find in memory; if a
184         bigger data set that would overflow to disk were used, then data
185         corruption would occur.
186
187 Mon Jan 15 10:55:18 2007  Ben Pfaff  <blp@gnu.org>
188
189         Simplify code.
190
191         * case.c (case_unshare): Make it check internally whether the
192         ref_cnt is greater than 1, so that the callers don't have to.
193         Update callers not to check.
194
195 Mon Jan 15 10:53:01 2007  Ben Pfaff  <blp@gnu.org>
196
197         Before, I was thinking that I might want to get rid of reference
198         counting at some point.  Now, I'm pretty sure that it's here to
199         stay.  Thus, because we have to store the value_cnt anyway for
200         reference-counted cases, we might as well expose it to users.
201
202         * case.c (case_get_value_cnt): New function.
203         (case_resize): Drop OLD_CNT argument.  Update all callers.  Only
204         resize case if its size actually changed.
205
206         * casefile.c (casefile_append_xfer): Use case_get_value_cnt
207         instead of peeking inside struct case directly.
208         (casefile_append): Ditto.
209
210 Mon Jan 15 10:50:22 2007  Ben Pfaff  <blp@gnu.org>
211
212         Get rid of the inlines for the case functions, which made the
213         header file hard to read.  (Also, in testing with "-O2 -DNDEBUG",
214         the inlines didn't speed up "make check" at all, which is not a
215         perfect benchmark but seems indicative.)
216         
217         * case.c: Remove #ifdef DEBUGGING...#endif around many function
218         definitions.  Remove some assertions on nonnull pointers that were
219         redundant with a pointer dereference soon after in the function.
220         Also:
221         (struct case_data): Move definition here from case.h.
222         (case_data): Ditto.
223         (case_num): Ditto.
224         (case_str): Ditto.
225         (case_data_wr): Ditto.
226         
227 Sun Jan 14 21:41:12 2007  Ben Pfaff  <blp@gnu.org>
228
229         * automake.mk: Add casedeque.h to sources.
230         
231         * casedeque.h: New file.
232
233         * procedure.c: (struct dataset) Change lag_count, lag_head,
234         lag_queue member into single struct casedeque member.  Update all
235         users to use the casedeque instead.
236         (lag_case) Removed.
237
238 Sun Jan 14 21:43:12 2007  Ben Pfaff  <blp@gnu.org>
239
240         * procedure.c: Simplify lagged cases interface.  Updated all
241         clients--well, the only client--to use the simplified interface.
242         (dataset_n_lag) Removed.
243         (dataset_set_n_lag) Removed.
244         (dataset_need_lag) New function.
245
246 Tue Jan  9 07:20:05 WST 2007 John Darrington <john@darrington.wattle.id.au>
247
248         * dictionary.c procedure.c: More changes to ensure that callbacks occur
249         whenever appropriate, but only when the dataset/dictionary is in a 
250         consistent state.
251
252 Sun Jan  7 08:33:04 WST 2007 John Darrington <john@darrington.wattle.id.au>
253
254         * dictionary.c dictionary.h : Added callbacks for change of filter and 
255         split variables.  Refactored some code to ensure that callbacks get
256         invoked when appropriate.
257
258         * procedure.c (proc_cancel_temporary_transformations): Make sure that 
259         replace_dict callback occurs when permanent_dict replaces the current
260         dictionary.
261
262 Wed Jan  3 11:02:11 WST 2007 John Darrington <john@darrington.wattle.id.au>
263
264         * dictionary.c dictionary.h : Added callback for when the weight 
265         variable of a dictionary changes.
266
267 Mon Jan  1 10:36:26 WST 2007 John Darrington <john@darrington.wattle.id.au>
268
269         * dictionary.c dictionary.h : Added replace_source and replace_dict
270         callbacks, and functions to deal with them.
271
272 Fri Dec 22 13:56:08 2006  Ben Pfaff  <blp@gnu.org>
273
274         Simplify missing value handling.
275
276         * missing-values.h (enum mv_class): New type.
277         (enum mv_type): Moved definition into missing-values.c and renamed
278         each MV_* to MVT_*, to distinguish them from the exposed mv_class
279         enums.  Updated all uses.
280         (struct missing_values): Changed type of `type' from `enum
281         mv_type' to `int' because the definition is no longer exposed.
282         
283         * missing-values.c (mv_is_value_missing): Add new enum mv_class
284         parameter.  Update all callers.
285         (mv_is_num_missing): Ditto.
286         (mv_is_str_missing): Ditto.
287         (mv_is_value_user_missing): Removed.  Changed callers to use
288         mv_is_value_missing.
289         (mv_is_num_user_missing): Removed.  Changed callers to use
290         mv_is_num_missing.
291         (mv_is_str_user_missing): Removed.  Changed callers to use
292         mv_is_str_missing.
293         (mv_is_value_system_missing): Removed.  Changed callers to use
294         mv_is_value_missing.
295         (mv_set_type): Removed.  Changed callers to use mv_clear.
296         (mv_clear): New function.
297         
298         * variable.c (var_is_value_missing): Add new enum mv_class
299         parameter.  Update all callers.
300         (var_is_num_missing): Ditto.
301         (var_is_str_missing): Ditto.
302         (var_is_value_user_missing): Removed.  Changed callers to use
303         var_is_value_missing.
304         (var_is_num_user_missing): Removed.  Changed callers to use
305         var_is_num_missing.
306         (var_is_str_user_missing): Removed.  Changed callers to use
307         var_is_str_missing.
308         (var_is_value_system_missing): Removed.  Changed callers to use
309         var_is_value_missing.
310         
311         * casefilter.c (struct casefilter): Use enum mv_class in place of
312         bool.
313         (casefilter_variable_missing): Adapt to new member.
314         (casefilter_create): Change signature to take enum mv_class,
315         update callers.
316
317 Fri Dec 22 20:08:38 WST 2006 John Darrington <john@darrington.wattle.id.au>
318
319         * casefile-factory.h fastfile-factory.c fastfile-factory.h: New files.
320
321         * case-sink.c case-sink.h procedure.c procedure.h 
322           storage-stream.c: Now uses the factory.
323         
324 Sat Dec 16 22:05:18 2006  Ben Pfaff  <blp@gnu.org>
325
326         Make it possible to pull cases from the active file with a
327         function call, instead of requiring indirection through a callback
328         function.
329
330         * case-source.h (struct case_source_class): Change ->read function
331         to return a single case, instead of calling a callback function
332         for each case.  Change ->destroy function to return an error
333         status.
334
335         * case-source.c (free_case_source): Pass along the value returned
336         by the case_source ->destroy function.
337
338         * procedure.c (struct write_case_data): Removed.
339         (struct dataset): Added some members to track procedure state.
340         (procedure): Optimize the trivial case at this level.
341         (internal_procedure): Re-implement in terms of proc_open,
342         proc_read, proc_close.
343         (proc_open) New function.
344         (proc_read) New function.
345         (proc_close) New function.
346         (write_case) Moved into proc_read.
347         (close_active_file) Moved closing of data source into proc_close.
348
349         * storage-source.c: Rewrote to conform with modified
350         case_source_class interface.
351
352         * transformations.c (trns_chain_execute): Added argument to allow
353         starting execution from an arbitrary transformation.  Updated
354         callers.
355
356         * transformations.h (enum TRNS_NEXT_CASE) Renamed TRNS_END_CASE.
357
358 Sat Dec 16 14:09:25 2006  Ben Pfaff  <blp@gnu.org>
359
360         * sys-file-reader.c (read_display_parameters): Don't assume that
361         MEASURE_* and ALIGN_* have the same values found in system files.
362
363         * sys-file-writer.c (write_variable_display_parameters): Ditto.
364
365         * variable.h: Change MEASURE_NOMINAL, MEASURE_ORDINAL,
366         MEASURE_SCALE to be 0-based instead of 1-based.  This also fixes
367         the value of n_MEASURES, which was off by 1 (at least from my
368         point of view).
369
370 Sat Dec 16 12:17:34 WST 2006 John Darrington <john@darrington.wattle.id.au>
371
372         * dictionary.c dictionary.h vardict.h variable.c: Added optional
373                 callbacks which are invoked when the dictionary or its 
374                 variables are changed.  
375         
376         * missing-values.c missing-values.h value-labels.c: Tidied up
377                 consistency checks, and made some of them return false 
378                 instead of assert-failing. 
379
380 Wed Dec 13 19:30:11 2006  Ben Pfaff  <blp@gnu.org>
381
382         * calendar.c (calendar_days_in_month): New function.
383
384 Mon Dec 11 07:53:39 2006  Ben Pfaff  <blp@gnu.org>
385
386         * value-labels.c (hash_int_val_lab): Only hash as many bytes as
387         the value label's width.
388
389 Sun Dec 10 14:21:29 2006  Ben Pfaff  <blp@gnu.org>
390
391         * sfm-private.h: Move contents into sys-file-writer.c, which is
392         the only remaining user.  Removed Borland C++-specific directives.
393         
394         * sys-file-reader.c: Clean up and rewrite entire file.  The
395         rewritten version is simpler and better abstracted, and should be
396         easier to maintain and extend.  It avoids using structures to read
397         file data, which is prone to padding variations among compilers.
398         It should also handle non-IEEE 754 system files, although I
399         haven't been able to find any.  It has been tested against many
400         .sav files obtained from the Web and found to produce the same
401         results as the earlier version of the code, or in some cases
402         improved results.  It is more tolerant of format variations found
403         in the wild.
404
405         * sys-file-reader.h (struct sfm_read_info): Removed `big_endian'
406         member, putting an enum integer_format in its place.  New member
407         `float_format'.  Changed `compressed' member to type bool.
408
409 Sun Dec 10 13:48:53 2006  Ben Pfaff  <blp@gnu.org>
410
411         * dictionary.c (dict_delete_consecutive_vars): New function.
412
413 Sat Dec  9 20:08:25 2006  Ben Pfaff  <blp@gnu.org>
414
415         * file-name.c (fn_search_path): Remove prefix arg that was unused
416         by any caller.  Updated all callers.
417
418 Sat Dec  9 20:04:22 2006  Ben Pfaff  <blp@gnu.org>
419
420         * format.c (fmt_dollar_template): Use user's decimal point
421         character.  Add assertion.
422
423 Sat Dec  9 20:02:25 2006  Ben Pfaff  <blp@gnu.org>
424
425         * format.c (fmt_dollar_template): New function, based on
426         dollar_format_template from var-type-dialog.c.
427
428 Sat Dec  9 18:05:59 2006  Ben Pfaff  <blp@gnu.org>
429
430         * data-out.c (output_scientific): Fix bad assumption that "buf" is
431         null-terminated.
432         
433 Sat Dec  9 17:23:23 2006  Ben Pfaff  <blp@gnu.org>
434
435         Finish converting struct variable to an opaque type.  In this
436         phase, we add remaining setter and getter functions, convert the
437         remaining PSPP code to use them, and do a bunch of cleanup.  The
438         resulting changes are pervasive but mostly trivial, and only the
439         notable changes are logged.
440         
441         * automake.mk (src_data_libdata_a_SOURCES): Add the new source
442         files.
443         
444         * case.c (case_data): Renamed case_data_idx.
445         (case_num): Renamed case_num_idx.
446         (case_str): Renamed case_str_idx.
447         (case_data_rw): Renamed case_data_rw_idx.
448
449         * case.h (case_data): New function with old name and an interface
450         that takes a variable instead of an index, which is easier to
451         use.  Updated all callers to use the new interface, or to use the
452         new *_idx function (see above).
453         (case_num): Ditto.
454         (case_str): Ditto.
455         (case_data_rw): Ditto.
456         
457         * category.c (cat_stored_values_destroy): Changed interface to
458         take a struct cat_vals * instead of a struct variable *.
459
460         * dictionary.c (dict_clone): Use new vector_clone function.     
461         (dict_clear) Use new var_destroy function.
462         (add_var) New function.
463         (dict_create_var) Rewrite in terms of dict_create_var_assert.
464         (dict_create_var_assert) Rewrite in terms of add_var.
465         (dict_clone_var) Rewrite in terms of dict_clone_var_assert.
466         (dict_clone_var_assert) Rewrite in terms of var_clone, add_var.
467         (dict_lookup_var) Use new var_create, var_destroy functions.
468         (dict_contains_var) Rewrite in terms of new vardict functionality.
469         (set_var_dict_index) New function.
470         (set_var_case_index) New function.
471         (reindex_vars) New function.
472         (dict_delete_var) Rewrite in terms of new vardict functionality.
473         (dict_reorder_var) Ditto.
474         (dict_reorder_vars) Ditto.
475         (rename_var) New function.
476         (dict_rename_var) Use rename_var.
477         (dict_rename_vars) Use pool to simplify code.  Use rename_var.
478         (dict_get_compacted_idx_to_fv) Rename
479         dict_get_compacted_dict_index_to_case_index, update callers.
480         (dict_create_vector) Use new vector_create function.
481         (dict_clear_vectors) Use new vector_destroy function.
482         (set_var_short_name_suffix) Move here from variable.c, renamed
483         from var_set_short_name_suffix, make static, update caller.
484
485         * sys-file-private.c: New file.  
486         (sfm_width_to_bytes) Moved here from variable.c, renamed from
487         width_to_bytes, update callers.
488
489         * sys-file-private.h: New file.  Later it will supplant
490         sfm-private.h; for now it supplements it.
491         (macro MIN_VERY_LONG_STRING) New macro.
492         (macro EFFECTIVE_LONG_STRING_LENGTH) New macro, from value.h.
493
494         * sys-file-reader.c: Use MIN_VERY_LONG_STRING - 1 where
495         MAX_LONG_STRING was used before.
496
497         * sys-file-writer.c: Ditto.
498
499         * value-labels.c: Change the paradigm here to be that a null
500         pointer is OK for a struct val_labs * in most cases; it just
501         represents an empty set of value labels.
502         (val_labs_copy) A copy of a null set is a null set.
503         (val_labs_count) A null set has 0 labels.
504         (val_labs_replace) Change return type to void.  Rewrite for
505         simplicity.
506         (val_labs_find) A null set does not contain the value.
507         (value_to_string) Moved to variable.c, renamed var_get_value_name,
508         transposed argument order, updated all callers.
509
510         * value.c: New file.
511         (value_dup) Moved here from variable.c.
512         (compare_values) Ditto.
513         (hash_value) Ditto.
514
515         * value.h: (macro MAX_SHORT_STRING) Rewrote for simplicity.
516         (macro MAX_LONG_STRING) Removed, because it was only interesting
517         for system files, not for general code.
518         (macro MAX_VERY_LONG_STRING) Ditto.
519         (macro EFFECTIVE_LONG_STRING_LENGTH) Moved to sys-file-private.h.
520         (macro MAX_ELEMS_PER_VALUE) Removed, as it was unused.
521
522         * vardict.h: New file, for an interface between variables and
523         their dictionaries.
524
525         * variable.c: A lot of functions were moved around, for better
526         organization.
527         (struct variable) Move definition here, from variable.h.
528         (var_type_adj) Removed--makes i18n hard.
529         (var_type_noun) Ditto.
530         (var_create) New function.
531         (var_clone) New function.
532         (var_destroy) New function.
533         (var_set_name) Assert that variable is not in a dictionary.
534         (compare_var_names) Rename compare_vars_by_name and fix a couple
535         of callers who thought the args were strings.
536         (hash_var_name) Rename hash_var_by_name.
537         (compare_var_ptr_names) Rename compare_var_ptrs_by_name.
538         (hash_var_ptr_name) Rename hash_var_ptr_by_name.
539         (var_is_very_long_string) Removed, because it was only interesting
540         to system file code.
541         (var_set_missing_values) Allow the argument to be the wrong width,
542         as long as we can resize it.  Simplify callers who were doing the
543         resizing themselves.
544         (var_get_value_labels) New function.
545         (var_has_value_labels) New function.
546         (var_set_value_labels) New function.
547         (alloc_value_labels) New function.
548         (var_add_value_label) New function.
549         (var_replace_value_label) New function.
550         (var_clear_value_labels) New function.
551         (var_lookup_value_label) New function.
552         (var_get_value_name) Moved here from variable.c, renamed from
553         var_get_value_name, transposed argument order, updated all
554         callers.
555         (var_to_string) Moved here, from variable-label.c.
556         (var_set_leave) New function.
557         (var_get_leave) New function.
558         (var_must_leave) New function.
559         (var_set_short_name_suffix) Moved to dictionary.c, renamed
560         set_var_short_name_suffix.
561         (var_get_dict_index) New function.
562         (var_get_case_index) New function.
563         (var_get_obs_vals) New function.
564         (var_set_obs_vals) New function.
565         (var_has_obs_vals) New function.
566         (var_get_vardict) New function.
567         (var_set_vardict) New function.
568         (var_has_vardict) New function.
569         (var_clear_vardict) New function.
570         (value_dup) Moved to value.c.
571         (compare_values) Ditto.
572         (hash_value) Ditto.
573
574         * variable.h: (enum NUMERIC) Rename VAR_NUMERIC, update all users.
575         (enum ALPHA) Rename VAR_STRING, update all users.
576
577         * vector.c: New file.
578         (struct vector) Moved here, from variable.h.
579         (check_widths) New function.
580         (vector_create) New function.
581         (vector_clone) New function.
582         (vector_destroy) New function.
583         (vector_get_name) New function.
584         (vector_get_var) New function.
585         (vector_get_var_cnt) New function.
586         (compare_vector_ptrs_by_name) New function.
587
588         * vector.h: New file.
589
590 Sun Dec 10 11:32:56 WST 2006 John Darrington <john@darrington.wattle.id.au>
591
592         * casefilter.c (casefilter_variable_missing): Avoided comparision of
593         string variables to SYSMIS.  Thanks to Ben Pfaff for reporting this
594         problem.
595
596 Sat Dec  9 07:18:03 WST 2006 John Darrington <john@darrington.wattle.id.au>
597
598         * value-labels.c (destroy_atoms): New function.
599         * value-labels.c (atom_create): Call destroy_atoms in atexit handler.
600
601 Thu Dec  7 17:38:26 2006  Ben Pfaff  <blp@gnu.org>
602
603         Thanks to Jason Stover for pointing out this problem.
604         
605         * data-out.c (output_number): Use gsl_finite from GSL, which is
606         portable, instead of isfinite, which is not.
607         (power256) Ditto.
608
609 Thu Dec  7 15:22:38 WST 2006 John Darrington <john@darrington.wattle.id.au>
610
611         * variable.c variable.h (value_dup): New function.
612
613 Mon Dec  4 22:20:17 2006  Ben Pfaff  <blp@gnu.org>
614
615         Start converting struct variable to an opaque type.  In this
616         phase, we add a bunch of setter and getter functions and convert
617         most of the PSPP code to use them.  The resulting changes are
618         pervasive but mostly trivial, and only the notable changes are
619         logged.
620         
621         * format.c (fmt_equal): New function.
622         
623         * variable.c (var_type_is_valid): New function.
624         (measure_is_valid) Moved here, from format.c.
625         (alignment_is_valid) Moved here, from format.c.
626         (var_get_name) New function.
627         (var_set_name) New function.
628         (width_to_type) New function.
629         (var_get_type) New function.
630         (var_get_width) New function.
631         (var_set_width) New function.
632         (var_is_numeric) New function.
633         (var_is_alpha) New function.
634         (var_is_short_string) New function.
635         (var_is_long_string) New function.
636         (var_is_very_long_string) New function.
637         (var_get_missing_values) New function.
638         (var_set_missing_values) New function.
639         (var_clear_missing_values) New function.
640         (var_has_missing_values) New function.
641         (var_is_value_missing) New function.
642         (var_is_num_missing) New function.
643         (var_is_str_missing) New function.
644         (var_is_value_user_missing) New function.
645         (var_is_num_user_missing) New function.
646         (var_is_str_user_missing) New function.
647         (var_is_value_system_missing) New function.
648         (var_get_print_format) New function.
649         (var_set_print_format) New function.
650         (var_get_write_format) New function.
651         (var_set_write_format) New function.
652         (var_set_both_formats) New function.
653         (var_get_label) New function.
654         (var_set_label) New function.
655         (var_clear_label) New function.
656         (var_has_label) New function.
657         (var_get_measure) New function.
658         (var_set_measure) New function.
659         (var_get_display_width) New function.
660         (var_set_display_width) New function.
661         (var_get_alignment) New function.
662         (var_set_alignment) New function.
663         (var_get_value_cnt) New function.
664         (var_get_leave) New function.
665         (var_get_short_name) New function.
666
667         * variable.h: (struct variable) Removed "type" and "nv" members;
668         they are now computed from "width" where needed.
669
670 Mon Dec  4 21:38:40 2006  Ben Pfaff  <blp@gnu.org>
671
672         * missing-values.c (mv_resize): Don't write beyond end of the
673         allocated buffer when resizing a long string.
674
675 Sat Dec  2 16:28:32 2006  Ben Pfaff  <blp@gnu.org>
676
677         Clean up identifier code: don't require identifier enumerations to
678         be in a particular order; make better use of string library;
679         expose less of the internals.
680                 
681         * identifier.c: (lex_skip_identifier) Rename lex_id_get_length,
682         change interface.  Updated all callers.
683         (lex_id_match) Change interface to use struct substring, update
684         all callers.
685         (lex_id_match_len) Removed.  Update callers to use lex_id_match.
686         (global array keywords[]) Make static, change form.  Update all
687         users to use lex_id_name instead.
688         (lex_is_keyword) New function.
689         (lex_id_to_token) Change interface to use struct substring, update
690         all callers.
691         (lex_id_name) New function.
692
693         * identifier.h: (T_FIRST_KEYWORD) Removed.  Changed users to call
694         lex_is_keyword instead.
695         (T_LAST_KEYWORD) Removed.
696         (T_N_KEYWORDS) Removed.
697         
698 Sat Nov 18 20:46:35 2006  Ben Pfaff  <blp@gnu.org>
699
700         * format.c: (fmt_date_template) Distinguish characters for which a
701         space is output and any date delimiter is allowed on input, from
702         those for which a space is output and only a space is allowed on
703         input.  The former is represented by X, the latter by a space.
704         Also, drop distinction between h and H, changing the former to the
705         latter.
706
707         * data-in.c: Completely rewrite internals to conform to SPSS input
708         formats as closely as possible.
709         (data_in) Changed external interface by replacing the structure
710         that was used as a single argument by a set of arguments.  Updated
711         all callers.
712         (data_in_finite_line) Removed.  Converted all callers to use plain
713         data_in.
714         (data_in_get_integer_format) New function.
715         (data_in_set_integer_format) New function.
716         (data_in_get_float_format) New function.
717         (data_in_set_float_format) New function.
718
719         * data-in.h: (enums DI_IGNORE_ERROR, DI_IMPLIED_DECIMALS) Removed.
720         (struct data_in) Removed.
721
722         * data-out.c: (output_date) Drop each component from the input as
723         it is output, to allow us to drop the distinction between h (a
724         count of hours) and H (the hour of day) template characters.
725         Also, handle new X template character.
726         (output_scientific) Follow more rational rule on when to drop
727         fraction introduced between SPSS 13 and 15.  Updated test case to
728         match new behavior.
729
730 Sat Nov 11 11:41:26 2006  Ben Pfaff  <blp@gnu.org>
731
732         Fix buffer overflow reported by John Darrington.
733
734         * data-out.c (output_bcd_integer): In case of SYSMIS, etc.,
735         realize that DIGITS is a count of nibbles, not of bytes.
736
737 Sat Nov  4 15:59:56 2006  Ben Pfaff  <blp@gnu.org>
738
739         * calendar.c (calendar_offset_to_gregorian) Also return the
740         year-of-day.  Change callers to new interface.
741
742         * data-out.c: Completely rewrite internals to conform to SPSS
743         output formats as completely as possible.
744         (data_out) Change interface to put input parameters before output
745         parameters, for consistency with the style I now prefer.  Update
746         all callers.
747         (data_out_get_integer_format) New public function.
748         (data_out_set_integer_format) New public function.
749         (data_out_get_float_format) New public function.
750         (data_out_set_float_format) New public function.
751
752         * data-out.h: New file.  Move prototype for data_out here, from
753         format.h.
754
755         * format.c: (fmt_step_width) Use equality comparison instead of
756         bitwise and, for clarity.
757         (fmt_is_string) Ditto.
758         (fmt_input_to_output) Fix categories that are translated to F
759         format.
760
761 Sun Nov  5 08:29:34 WST 2006 John Darrington <john@darrington.wattle.id.au>
762
763         * casefilter.c casefilter.h (new files), casefile.c casefile.h 
764         casefile-private.h: Added casefilter to assist commands with missing 
765         values.
766
767 Sat Nov  4 11:47:09 2006  Ben Pfaff  <blp@gnu.org>
768
769         Implement SET ERRORS, SHOW ERRORS.  Fixes bug #17609.
770         
771         * settings.c: (route_errors_to_terminal) New variable.
772         (route_errors_to_listing) New variable. 
773         (get_error_routing_to_terminal) New function.
774         (set_error_routing_to_terminal) New function.
775         (get_error_routing_to_listing) New function.
776         (set_error_routing_to_listing) New function.
777
778         * settings.h: (SET_ROUTE_* enums) Removed, because unused.
779
780 Tue Oct 31 19:58:27 2006  Ben Pfaff  <blp@gnu.org>
781
782         * format.c: Completely rewrite, to achieve better abstraction.
783         Rewrite all references to formats in other files.
784         
785         * format.def: Rewrite and reorganize.
786
787         * settings.c: Move everything related to custom currency formats
788         into format.[ch], changing them in form, so as to group related
789         code and definitions better.  Changed all references to use the
790         new functions.
791         (static var decimal) Removed.
792         (static var grouping) Removed.
793         (static var cc) Removed.
794         (get_decimal) Removed.
795         (set_decimal) Removed.
796         (get_grouping) Removed.
797         (set_grouping) Removed.
798         (get_cc) Removed.
799         (set_cc) Removed.
800
801         * settings.h: (macro CC_CNT) Removed.
802         (macro CC_WIDTH) Removed.
803         (struct custom_currency) Removed.
804
805 Tue Oct 31 19:56:19 2006  Ben Pfaff  <blp@gnu.org>
806
807         * data-in.c (data_in): Use switch statement instead of table, to
808         avoid dependence on the order of the FMT_* enums.
809
810 Tue Oct 31 19:35:36 2006  Ben Pfaff  <blp@gnu.org>
811
812         * data-out.c: (num_to_string) Removed, because it was dead code.
813
814 Tue Oct 31 18:09:24 2006  Ben Pfaff  <blp@gnu.org>
815
816         * data-in.c (parse_trailer): Fix error message.
817
818 Sat Oct 28 11:56:50 2006  Ben Pfaff  <blp@gnu.org>
819
820         * format.c (fmt_is_binary): New function.
821
822 Thu Oct 19 22:59:56 WST 2006 John Darrington <john@darrington.wattle.id.au>
823
824         * procedure.c procedure.h: Encapsulated the static data into a single
825         struct.  
826
827 Sat Oct 14 16:56:44 2006  Ben Pfaff  <blp@gnu.org>
828
829         * casefile.c (casereader_read_xfer): Always initialize the case,
830         even on an error condition.
831
832 Wed Sep 27 09:37:49 WST 2006 John Darrington <john@darrington.wattle.id.au>
833
834         * procedure.c (case_limit_trns_proc): Fixed buglet which rendered the 
835         entire function useless.
836
837 Mon Sep 25 17:11:46 WST 2006 John Darrington <john@darrington.wattle.id.au>
838
839         * casefile-private.h casefile.c casefile.h fastfile.c: Created new
840         casereader method casereader_clone.   
841         
842         * procedure.c pransformations.h: Introduced new type casenum_t
843
844 Thu Sep 21 07:00:30 2006  Ben Pfaff  <blp@gnu.org>
845
846         * variable.c: (width_to_bytes) Rephrase code for clarify.
847
848 Sun Jul 16 19:52:03 2006  Ben Pfaff  <blp@gnu.org>
849
850         * format.c: (fmt_type_from_string) New function.
851         (fmt_to_string) Include decimals in output if the format has
852         decimals, even if the format type does not.  This way, we can
853         accurately reproduce incorrect formats in user output.
854         (check_common_specifier) Make the check for a bad format type an
855         assertion, so we get bug reports if they show up.  Fix message.
856         Check for decimal places with a format type that doesn't allow
857         them.
858         (check_input_specifier) Remove check for FMT_X, which has been
859         deleted.
860         (check_output_specifier) Ditto. 
861
862         * format.def: Remove FMT_T, FMT_X, FMT_DESCEND, FMT_NEWREC.
863
864         * format.h: (macro FMT_TYPE_LEN_MAX) New macro.
865         (struct fmt_desc) Use FMT_TYPE_LEN_MAX in definition.
866         (enum fmt_parse_flags) Removed.
867
868 Mon Jul 17 18:26:21 WST 2006 John Darrington <john@darrington.wattle.id.au>
869
870         * casefile.c casefile.h: Converted to  an abstract base class.
871         * casefile-private.h fastfile.c fastfile.h: New files.
872         * automake.mk procedure.c scratch-writer.c storage-stream.c
873
874 Wed Jul 12 21:02:26 2006  Ben Pfaff  <blp@gnu.org>
875
876         * procedure.c (internal_procedure): Create sink_case with only as
877         many values as the compacted dictionary.
878
879 Wed Jul 12 21:01:00 2006  Ben Pfaff  <blp@gnu.org>
880
881         Remove "debugging" code that caused plenty of false positives and
882         no true positives.
883         
884         * case.h (struct ccase): [DEBUGGING] Remove `this' member.
885
886         * case.c: Remove all references to `this' member.
887
888 Thu Jul  6 19:09:53 2006  Ben Pfaff  <blp@gnu.org>
889
890         Fix link error noted by Jason Stover.
891         
892         * storage-stream.c: Include <assert.h>.
893
894 Tue Jul  4 08:47:35 2006  Ben Pfaff  <blp@gnu.org>
895
896         Fix bug #15766 (/KEEP subcommand on SAVE doesn't fully support
897         ALL) and additional underlying system file issues.
898
899         Thanks to John Darrington for review.
900
901         First problem: var_hash points to variables not owned by the
902         sys-file-reader, which the caller may free or modify.  Use an
903         array of sfm_vars instead, as done earlier (e.g. CVS version
904         1.12).
905         
906         * sys-file-reader.c (struct sfm_reader): Remove var_hash, svars
907         members and remove all code that references it.  Add vars, var_cnt
908         members.  Remove fix_specials member, which was unused.
909         (struct sfm_var) Remove name member, which was unused.
910         (sfm_close_reader) Free vars member instead of var_hash.
911         (compare_var_shortnames) Removed.
912         (hash_var_shortname) Removed.
913         (sfm_open_reader) Fill out vars array.
914         (compare_var_index) Removed.
915         (sfm_read_case) Use vars instead of var_hash.
916         
917         Second problem: we're confused about when we actually have very
918         long strings, causing us to choose incorrectly between slow path
919         and fast path in sfm_read_case.
920
921         * sys-file-reader.c: (sfm_open_reader) Only mark has_vls if we
922         have very long strings, not when we have long variable names,
923         which is an unrelated feature.
924
925 Tue Jun 27 12:06:49 2006  Ben Pfaff  <blp@gnu.org>
926
927         * variable.h: Move var_set and variable parsing declarations to
928         new header, src/language/lexer/variable-parser.h.  Modified lots
929         of files to include the new header.
930
931 Sun Jun 25 22:39:32 2006  Ben Pfaff  <blp@gnu.org>
932
933         * value-labels.c (value_to_string): When there's no value label,
934         format the variable according to its print format, instead of
935         always effectively using A or F format.
936
937 Mon Jun 19 18:05:42 WST 2006 John Darrington <john@darrington.wattle.id.au>
938
939         * casefile.c (casefile_get_random_reader): Nasty hack to get around 
940         the mode assertion.
941
942         * format.c: Removed tortological assertion.
943
944 Fri Jun  9 12:20:09 2006  Ben Pfaff  <blp@gnu.org>
945
946         Reform string library.
947         
948         * file-name.c (fn_interp_vars): Change interface to take a
949         substring as input.  Updated all users.
950         
951 Fri Jun  9 12:11:24 2006  Ben Pfaff  <blp@gnu.org>
952
953         * format.c (measure_is_valid): Really return false when m >=
954         n_MEASURES.
955
956 Tue Jun  6 18:46:26 2006  Ben Pfaff  <blp@gnu.org>
957
958         Implement random access to casefiles, for use in GUI.
959         
960         * casefile.c: (struct casereader) Add `random', `file_ofs',
961         `buffer_ofs' members.
962         (casefile_get_random_reader) New function.
963         (read_open_file) Break part into new function
964         seek_and_fill_buffer().
965         (fill_buffer) Update buffer_ofs, file_ofs.
966         (casereader_seek) New function.
967
968 Tue May 30 19:52:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
969
970         * settings.c: Added call to i18n{done, init}.
971
972 Tue May  9 21:09:17 2006  Ben Pfaff  <blp@gnu.org>
973
974         * procedure.h: Add WARN_UNUSED_RESULT to procedure function
975         prototypes.
976
977 Tue May  9 21:08:05 2006  Ben Pfaff  <blp@gnu.org>
978
979         * casefile.c: Convert many uses of `int' to `bool'.
980
981 Sat May  6 22:49:43 2006  Ben Pfaff  <blp@gnu.org>
982
983         * transformations.c (trns_chain_destroy): Destroy chain's trns
984         member, to fix memory leak.
985
986 Sat May  6 22:48:30 2006  Ben Pfaff  <blp@gnu.org>
987
988         * storage-stream.c (storage_source_decapsulate): Destroy case
989         source to fix memory leak.
990
991 Sat May  6 22:46:47 2006  Ben Pfaff  <blp@gnu.org>
992
993         * scratch-reader.c (scratch_reader_read_case): Copy into existing
994         case passed as argument instead of initializing the argument as a
995         case.  Fixes memory leak that showed up in
996         tests/command/aggregate.sh with scratch files.
997
998 Sat May  6 22:45:55 2006  Ben Pfaff  <blp@gnu.org>
999
1000         * procedure.c (proc_done): Destroy default_dict, to fix memory
1001         leak.
1002
1003 Sat May  6 22:44:44 2006  Ben Pfaff  <blp@gnu.org>
1004
1005         Simplify procedure_with_splits().
1006         
1007         * procedure.c (struct split_aux_data): Removed case_count member.
1008         (procedure_with_splits) Don't initialize case_count.
1009         (split_procedure_case_func) Check whether prev_case is null
1010         instead of case_count.
1011         (split_procedure_end_func) Ditto.
1012
1013 Sat May  6 22:42:23 2006  Ben Pfaff  <blp@gnu.org>
1014
1015         * case.c (case_move): Do nothing if dst and src are the same
1016         object.
1017         (case_try_create) Merge two similar cases.
1018         (case_copy) Unshare only if data must be actually copied.
1019
1020 Sun May  7 10:04:06 WST 2006 John Darrington <john@darrington.wattle.id.au>
1021
1022         * data-in.c data-out.c dictionary.c sys-file-reader.c
1023         sys-file-writer.c variable.c variable.h:  Reworked very long string
1024         support for better encapsulation.
1025
1026 Sat May  6 19:02:00 2006  Ben Pfaff  <blp@gnu.org>
1027
1028         * value-labels.c (val_labs_can_set_width): New function.
1029         (val_labs_set_width) Clear labels if increasing width to long
1030         string.
1031         (val_labs_destroy) Remove unneeded test for null.
1032         
1033 Sat May  6 16:14:08 2006  Ben Pfaff  <blp@gnu.org>
1034
1035         * value-labels.h: Remove unneeded dependency on variable.h.
1036
1037 Sat May  6 15:58:36 2006  Ben Pfaff  <blp@gnu.org>
1038
1039         Get rid of `char *c' member in union value, for cleanliness.
1040         
1041         * value.h: (union value) Remove `c' member.
1042
1043 Sat May  6 15:36:59 2006  Ben Pfaff  <blp@gnu.org>
1044
1045         Make dictionary compacting functions a little more general.
1046         
1047         * sys-file-writer.c (sfm_open_writer): Use
1048         dict_compacting_would_change().
1049         (does_dict_need_translation) Removed.
1050
1051 Sat May  6 15:35:42 2006  Ben Pfaff  <blp@gnu.org>
1052
1053         Make dictionary compacting functions a little more general.
1054         
1055         * dictionary.c (dict_needs_compaction): Rename
1056         dict_compacting_would_shrink().  Update all callers.
1057         (dict_compacting_would_change) New function.
1058         
1059 Sat May  6 14:25:49 2006  Ben Pfaff  <blp@gnu.org>
1060
1061         * sys-file-writer.c: (does_dict_need_translation) Fix bug:
1062         inverted return value (!).
1063
1064 Sat May  6 13:37:52 2006  Ben Pfaff  <blp@gnu.org>
1065
1066         Continue reforming procedure execution.  
1067
1068         * procedure.c: Search and replace "vfm" by "proc".  Notably:
1069         (static var vfm_source) Rename proc_source.  Update all
1070         references.
1071         (static var vfm_sink) Rename proc_sink.  Update all references.
1072         
1073 Sat May  6 12:38:55 2006  Ben Pfaff  <blp@gnu.org>
1074
1075         Continue reforming procedure execution.  In this phase, remove
1076         PROCESS IF, which was deprecated anyway and can be easily
1077         simulated with TEMPORARY followed by SELECT IF.
1078
1079         * procedure.c: (open_active_file) Don't call
1080         add_process_if_trns().
1081         (discard_variables) Get rid of redundant call to
1082         proc_cancel_all_transformations().
1083         (add_process_if_trns) Removed.
1084         (process_if_trns_proc) Removed.
1085         (process_if_trns_free) Removed.
1086
1087 Sat May  6 10:58:05 2006  Ben Pfaff  <blp@gnu.org>
1088
1089         Continue reforming procedure execution.  In this phase, add
1090         `const' to the case passed to procedure()'s callback.
1091
1092         Updated all users of procedure() as well.
1093         
1094         * procedure.c: (struct write_case_data) Add "const" to ccase
1095         parameter for case_func member.
1096         (procedure) Add "const" to ccase parameter for proc_func
1097         parameter.
1098         (multipass_case_func) Make ccase parameter const.
1099         (internal_procedure) Add "const" to ccase parameter for case_func
1100         parameter.
1101         (split_procedure_case_func) Make ccase parameter const.
1102         (multipass_split_case_func) Make ccase parameter const.
1103         
1104 Sat May  6 10:30:33 2006  Ben Pfaff  <blp@gnu.org>
1105
1106         Continue reforming procedure execution.  In this phase, get rid of
1107         the output code for SPLIT FILE groups in procedure.c, which really
1108         shouldn't be doing any output.  Move it into the individual
1109         procedures instead.  This also adds some flexibility.
1110
1111         Updated many users of procedure_with_splits() and
1112         multipass_procedure_with_splits() to call
1113         output_split_file_values() and to deal with increased use of
1114         const.
1115
1116         * procedure.c: (struct split_aux_data) Add "const struct ccase *"
1117         parameter to begin_func member.
1118         (procedure_with_splits) Add "const struct ccase *" parameter to
1119         begin_func parameter.  Make ccase parameter const in proc_func
1120         parameter.
1121         (split_procedure_case_func) Don't dump split file group.  Pass
1122         case to begin_func.
1123         (dump_splits) Moved to language/dictionary/split-file.c as
1124         output_split_file_values().
1125         (struct multipass_split_aux_data) Add "const struct ccase *"
1126         parameter to split_func member.
1127         (multipass_procedure_with_splits) Add "const struct ccase *"
1128         parameter to split_func parameter.
1129         (multipass_split_case_func) Save new SPLIT FILE case before
1130         outputting case.
1131         (multipass_split_output) Pass saved SPLIT FILE case to split_func.
1132         
1133 Fri May  5 22:48:50 2006  Ben Pfaff  <blp@gnu.org>
1134
1135         Continue reforming procedure execution.  Change
1136         internal_procedure() so that it calls open_active_file() and
1137         close_active_file(), which isolates most of the actual procedure
1138         functionality.
1139
1140         * procedure.c: (struct write_case_data) Rename `proc_func' member
1141         to `case_func' and update all references.
1142         (procedure) Rewrite as one-line wrapper around
1143         internal_procedure().
1144         (struct multipass_aux_data) New.
1145         (multipass_callback) Renamed multipass_case_func().  Use struct
1146         multipass_aux_data as auxiliary data.
1147         (multipass_end_func) New function.
1148         (multipass_procedure) Rewrite as wrapper for internal_procedure()
1149         that uses multipass_case_func, multipass_end_func.
1150         (internal_procedure) Add `end_func' argument.  Move optimization
1151         of trivial case in here.  Move call to open_active_file() and
1152         close_active_file() in here.  Now assert that vfm_source is
1153         non-null.
1154         (procedure_with_splits_callback) Rename
1155         split_procedure_case_func().
1156         (split_procedure_end_func) New function.
1157         (multipass_split_callback) Rename multipass_split_case_func.
1158         (multipass_split_end_func) New function.
1159         (discard_variables) No need to test for nonnull vfm_source.
1160
1161 Fri May  5 21:34:02 2006  Ben Pfaff  <blp@gnu.org>
1162
1163         Continue reforming procedure execution.  Get rid of unused member.
1164
1165         * procedure.c: (struct write_case_data) Remove `cases_analyzed'
1166         member.
1167         (write_case) Don't increment cases_analyzed.
1168
1169 Thu May  4 21:50:11 2006  Ben Pfaff  <blp@gnu.org>
1170
1171         Continue reforming procedure execution.  In this phase, move
1172         procedure.c and procedure.h from src to src/data.  Update
1173         makefiles and #includes accordingly.
1174
1175         * procedure.c: Moved here from src/.
1176
1177         * procedure.h: Moved here from src/.
1178
1179 Wed May  3 22:42:12 2006  Ben Pfaff  <blp@gnu.org>
1180
1181         Continue reforming procedure execution.  In this phase, get rid of
1182         many global variables, consolidating procedure execution in
1183         procedure.c.  Encapsulate transformations in new "struct
1184         trns_chain".  Also, change implementation of N OF CASES, FILTER,
1185         and PROCESS IF from special cases to transformations.
1186          
1187         * automake.mk: (src_data_libdata_a_SOURCES) Add transformations.c,
1188         transformations.h.
1189
1190         * dictionary.c: (global variable default_dict) Move to
1191         src/procedure.c.
1192
1193         * variable.h: (TRNS_*) Move to transformations.h.
1194         (struct transformation) Move to transformations.c.
1195
1196 Thu May  4 13:47:06 WST 2006 John Darrington <john@darrington.wattle.id.au>
1197
1198         * sys-file-reader.c: Fixed invalid read problems.
1199
1200 Tue May  2 15:57:10 2006  Ben Pfaff  <blp@gnu.org>
1201
1202         * storage-stream.c: Add missing function comments.
1203
1204 Tue May  2 15:50:21 2006  Ben Pfaff  <blp@gnu.org>
1205
1206         Continue reforming procedure execution.  In this phase, add some
1207         new, needed functionality to storage-stream.
1208
1209         * storage-stream.c: (storage_source_decapsulate) New function.
1210
1211 Tue May  2 15:43:36 2006  Ben Pfaff  <blp@gnu.org>
1212
1213         * variable.c (width_to_bytes): Declarations must precede
1214         statements for C90 compliance.
1215
1216 Tue May  2 10:42:05 WST 2006 John Darrington <john@darrington.wattle.id.au>
1217
1218         * data-out.c, data-in.c, variable.c, variable.h: New functions 
1219         copy_mangle and copy_demangle for reading/writing cases; emulates the 
1220         way SPSS deals with strings > 255 bytes.
1221
1222         * sys-file-reader.c sys-file-writer.c: Added support for Record 7, 
1223         subtype 14 needed for strings longer than 255 bytes.
1224
1225         * dictionary.c, format.def, value.c : Updated to use MAX_STRING 
1226         instead of literal values. Also fixed some constness issues.
1227
1228         * format.h: Constness
1229
1230         * sfm-private.h: Renamed the case_size identifier, since I discovered 
1231         that SPSS's respect for this variable is very nominal.
1232
1233 Mon May  1 15:45:42 2006  Ben Pfaff  <blp@gnu.org>
1234
1235         Change case limit type from int to size_t.
1236
1237         * dictionary.c: (struct dictionary) Change type of case_limit
1238         member.
1239         (dict_get_case_limit) Change return type.
1240         (dict_set_case_limit) Change parameter type.
1241
1242 Wed Apr 26 20:01:19 2006  Ben Pfaff  <blp@gnu.org>
1243
1244         * variable.h: (struct variable) Rename `reinit' member as `leave'
1245         and invert sense.  Fix up all references.
1246
1247 Wed Apr 26 19:39:28 2006  Ben Pfaff  <blp@gnu.org>
1248
1249         Continue reforming procedure execution.  In this phase, break
1250         procedure.c into multiple files.
1251         
1252         * automake.mk: (src_data_libdata_a_SOURCES) Add all the new files.
1253
1254         * case-sink.c: New file.
1255
1256         * case-sink.h: New file.
1257         
1258         * case-source.c: New file.
1259
1260         * case-source.h: New file.
1261         
1262         * storage-stream.c: New file.
1263
1264         * storage-stream.h: New file.
1265
1266 Wed Apr 26 14:55:19 2006  Ben Pfaff  <blp@gnu.org>
1267
1268         * variable.h: (struct variable) Remove `init' member and all
1269         references to it from other files.  It was initialized in several
1270         places, but nothing really ever used it for anything worthwhile.
1271         Thanks to Jason Stover for pointing out how confusing this
1272         member is.
1273
1274 Sun Apr 23 22:04:45 2006  Ben Pfaff  <blp@gnu.org>
1275
1276         Continue reforming error message support.  In this phase, get rid
1277         of message "titles" and put the message text in `struct error'.
1278         Now `struct error' encapsulates a message more properly.
1279         
1280         * casefile.c: (io_error) Use err_msg() instead of err_vmsg().
1281         Format message ourselves.
1282
1283         * data-in.c: (vdls_error) Ditto.
1284
1285         * por-file-reader.c: (error) Ditto.
1286
1287         * sys-file-reader.c: (corrupt_msg) Ditto.
1288
1289 Sun Apr 16 18:49:51 2006  Ben Pfaff  <blp@gnu.org>
1290
1291         GNU standards require "file name" instead of "filename" in
1292         documentation.  It's nice for our code to follow the convention
1293         too.
1294         
1295         * casefile.c: (struct casefile) Rename `filename' member to
1296         `file_name'.  Updated all references.
1297
1298         * file-name.c: [!unix] (struct file_identity) Rename
1299         normalized_filename member to normalized_file_name.  Updated all
1300         references.
1301
1302 Sun Apr 16 18:35:33 2006  Ben Pfaff  <blp@gnu.org>
1303
1304         We don't really support anything but Unix-like environments well,
1305         so we might as well de-obfuscate by writing directory and path
1306         separators explicitly.
1307
1308         * file-name.h: (macro DIR_SEPARATOR) Removed.  Changed all usages
1309         to just '/'.
1310         (macro PATH_SEPARATOR) Removed.  Changed all usages to just ':'.
1311         (macro DIR_SEPARATOR_STRING) Removed.  Changed all usages to just
1312         "/".
1313         (macro PATH_SEPARATOR_STRING) Removed.  Changed all usages to just
1314         ":"
1315
1316 Sun Apr 16 18:28:35 2006  Ben Pfaff  <blp@gnu.org>
1317
1318         GNU standards require "file name" instead of "filename" in
1319         documentation.  It's nice for our code to follow the convention
1320         too.
1321         
1322         * filename.c: Rename to file-name.c.
1323
1324         * filename.h: Rename to file-name.h.  Update all inclusions.
1325         Update header guards.
1326
1327         * automake.mk: Update file names.
1328
1329 Sun Apr 16 16:42:47 2006  Ben Pfaff  <blp@gnu.org>
1330
1331         * filename.c: (fn_dirname) Renamed fn_dir_name(), all references
1332         updated.
1333         (fn_basename) Removed (dead code).
1334         (fn_absolute_p) Renamed fn_is_absolute(), all references updated.
1335         (fn_special_p) Renamed fn_is_special(), all references updated.
1336         (fn_exists_p) Renamed fn_exists(), all references updated.
1337
1338 Sun Apr 16 16:33:58 2006  Ben Pfaff  <blp@gnu.org>
1339
1340         * filename.c: (fn_tilde_expand) Rewrite for cleaner code.  
1341         Also, now it only tilde-expands file names, not paths.
1342         (fn_search_path) Tilde-expand one directory at a time.
1343
1344 Sun Apr 16 16:28:06 2006  Ben Pfaff  <blp@gnu.org>
1345
1346         * filename.c: (fn_search_path) rewrite for cleaner code.  Also,
1347         get rid of non-Unixlike version of the code, which has probably
1348         never been tested.
1349         (fn_prepend_dir) Removed (dead code).
1350
1351         * filename.h: (macro DIR_SEPARATOR_STRING) New.
1352         (macro PATH_SEPARATOR_STRING) New.
1353 Sun Apr 16 16:05:28 2006  Ben Pfaff  <blp@gnu.org>
1354
1355         Continue reforming error message support.  In this phase, we get
1356         rid of VM() and the other msg() support for "verbosity", replacing
1357         it by a new function verbose_msg().
1358
1359         * filename.c: (fn_search_path) Use verbose_msg() instead of
1360         msg(VM(), ...).  
1361
1362 Sat Apr 15 19:53:19 2006  Ben Pfaff  <blp@gnu.org>
1363
1364         * sfm-private.h: Get rid of #defines after #error, which makes no
1365         sense.
1366
1367 Sat Apr 15 19:48:57 2006  Ben Pfaff  <blp@gnu.org>
1368
1369         Get rid of our own int32 type in favor of the standard int32_t
1370         type.
1371         
1372         * sfm-private.h: (int32 macro) Don't define this anymore.  Do
1373         include <stdint.h>.
1374
1375         * sys-file-reader.c: Use int32_t instead of int32 throughout.
1376         
1377         * sys-file-writer.c: Use int32_t instead of int32 throughout.
1378
1379 Sat Apr 15 19:36:47 2006  Ben Pfaff  <blp@gnu.org>
1380
1381         Remove ill-considered file routines that are no longer used.
1382         
1383         * filename.c: (fn_open_ext) Removed.
1384         (fn_close_ext) Removed.
1385
1386         * filename.h: (struct file_ext) Removed.
1387
1388 Mon Apr  3 13:22:39 2006  Ben Pfaff  <blp@gnu.org>
1389
1390         * variable.c (var_is_valid_name): Move declarations before code
1391         for C90 compliance.
1392
1393 Tue Apr  4 15:28:40 WST 2006 John Darrington <john@darrington.wattle.id.au>
1394
1395         * filename.ch (fn_interp_vars): Fixed small buglet.
1396
1397 Tue Mar 28 13:47:16 WST 2006 John Darrington <john@darrington.wattle.id.au>
1398         
1399         * filename.[ch] (fn_interp_vars): Changed the signature and semantics
1400         so as to modify the string inline.   Thus makeing it easier to
1401         destroy the results when no longer needed.
1402         
1403 2006-03-25  Jason Stover  <jhs@math.gcsu.edu>
1404
1405         * category.c (cat_stored_values_destroy): Fixed memory leak.
1406
1407 Fri Mar 24 18:15:41 2006  Ben Pfaff  <blp@gnu.org>
1408
1409         Add some missing frees.  Thanks to John Darrington for reporting
1410         these.
1411
1412         * any-writer.c (any_writer_close): Free writer.
1413
1414         * any-reader.c (any_reader_close): Free reader.
1415
1416 Mon Mar 20 16:33:53 2006  Ben Pfaff  <blp@gnu.org>
1417
1418         * por-file-reader.c: (error) Mark as NO_RETURN.
1419
1420 Sat Mar 11 15:06:07 WST 2006 John Darrington <john@darrington.wattle.id.au>
1421
1422         * settings.c: Changed default value of scompress to true.
1423
1424 Sat Mar  4 13:22:51 2006  Ben Pfaff  <blp@gnu.org>
1425
1426         * sfm-private.h: Include variable.h, to get SHORT_NAME_LEN.
1427
1428         * value.h: Remove check on MAX_SHORT_STRING, which I don't think
1429         really applies.
1430
1431         * variable.h: Move definition of SHORT_NAME_LEN, LONG_NAME_LEN
1432         here from pref.h.orig.
1433
1434 Sat Mar  4 12:50:48 WST 2006 John Darrington <john@darrington.wattle.id.au>
1435
1436         * sys-file-reader.c: Fixed bug reading compressed files.
1437
1438 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
1439
1440         * Numerous renames.  See src/ChangeLog for details.
1441         
1442         * Moved files from src directory