Added CONFIGUREFLAGS option to Smake.
[pspp] / src / ChangeLog
1 Wed May  4 08:50:11 WST 2005 John Darrington <john@darrington.wattle.id.au>
2
3         * casefile.c: Removed unnecessary #include <valgrind/valgrind.h>
4
5 Tue May  3 19:14:48 WST 2005 John Darrington <john@darrington.wattle.id.au>
6
7         * copyleft.c: Updated copyright date.
8
9         * Makefile.am: Removed erroneous explicit "-lplot"
10
11         * examine.q oneway.q: Made these files conform to ISO/IEC 9899:1990
12
13 Tue May  3 16:20:31 WST 2005 John Darrington <john@darrington.wattle.id.au>
14
15         * command.c command.def: Added description string for unimplemented commands.
16
17         * oneway.q: Sorted the hash tables before shipping out the results. Closes 
18         bug [#12931].
19
20 Mon May  2 23:45:01 2005  Ben Pfaff  <blp@gnu.org>
21
22         Code improvements.
23         
24         * data-list.c:  (parse_fixed) Use lex_end_of_command().
25         (parse_free) Ditto.
26         (cmd_repeating_data) Set cont_end.num in right situations.
27         (parse_repeating_data) Remove redundant test.
28
29 Mon May  2 23:37:19 2005  Ben Pfaff  <blp@gnu.org>
30
31         Partial fix for PR 12859.
32         
33         * data-list.c: (cmd_data_list) Add transformation properly in
34         vfm_source == NULL case.
35
36 Mon May  2 23:27:28 2005  Ben Pfaff  <blp@gnu.org>
37
38         * lexer.c: (lex_error) Improve error messages.
39
40 Mon May  2 22:28:17 2005  Ben Pfaff  <blp@gnu.org>
41
42         * get.c: (cmd_match_files) Check token type before trying to match
43         tokid.  Fixes PR 12923.
44
45 Mon May  2 22:16:51 2005  Ben Pfaff  <blp@gnu.org>
46
47         * flip.c: [HAVE_SYS_TYPES_H] Include <sys/types.h>.  Fixes PR
48         12789.
49
50 Mon May  2 22:02:52 2005  Ben Pfaff  <blp@gnu.org>
51
52         * expressions/generate.pl: (get_token) Make use of /g
53         backward-compatible with Perl 5.6.1.
54
55 Sun May  1 23:00:19 2005  Ben Pfaff  <blp@gnu.org>
56
57         * var-display.c: (cmd_variable_alignment) Fix memory leak.
58         (cmd_variable_level) Ditto.
59
60 Sun May  1 22:49:04 2005  Ben Pfaff  <blp@gnu.org>
61
62         Hash table had buggy deletion function.  The fix required changing
63         other functions to do probing in the required order.
64
65         * hash.c: (locate_matching_entry) Rewrite and change interface.
66         (hsh_rehash) Rewrite to use locate_matching_entry().
67         (hsh_probe) Ditto.
68         (hsh_find) Ditto.
69         (hsh_delete) Ditto.  Also, fix stupid bugs.
70
71 Sun May  1 22:24:58 2005  Ben Pfaff  <blp@gnu.org>
72
73         * dictionary.c: (dict_clone) Properly copy vectors.
74
75 Sun May  1 22:07:58 2005  Ben Pfaff  <blp@gnu.org>
76
77         New implementation of long variable names.  Each variable has a
78         "normal" name, which may be up to 64 bytes long and which is used
79         for all normal operations.  Variables may have a "short" name,
80         which is limited to 8 bytes and used only for system and portable
81         file input and output.
82         
83         Make tokid case-preserving.  Update most uses of tokid to treat it
84         case-insensitively.
85
86         Update many commands to deal with long variable names.
87
88         * autorecode.c: (cmd_autorecode) Use strcasecmp() instead of strcmp().
89
90         * command.c: (cmd_parse) Ditto.
91         (match_strings) Use toupper() before comparing characters.
92         (conflicting_3char_prefixes) Use mm_case_compare() instead of
93         memcmp().
94         (cmd_match_words) Ditto.
95
96         * compute.c: (lvalue_parse) Use st_trim_copy() instead of
97         strncpy().
98
99         * count.c: (struct cnt_var_info) Change n[] to fit long var name.
100         Use st_trim_copy() instead of strcpy().
101
102         * data-in.c: (parse_enum) Use mm_case_compare() instead of
103         memcmp().
104
105         * data-list.c: (struct dls_var_spec) Change name[] to fit long var
106         name.
107         (parse_free) Use st_trim_copy() instead of strcpy().
108
109         * descript.c: (struct dsc_var) Change z_name[] to fit long var
110         name.
111         (try_name) Use strcasecmp() instead of strcmp().
112         (generate_z_varname) Use st_trim_copy() instead of strcpy().
113         (descriptives_compare_dsc_vars) Use strcasecmp() instead of
114         strcmp().
115
116         * dictionary.c: (struct dictionary) Removed `long_name_tab'
117         member.
118         (compare_long_names) Removed.
119         (hash_long_name) Removed.
120         (dict_create) Don't initialize `long_name_tab' member.
121         (dict_clone) Copy short names into new dictionary. 
122         (dict_clear) Don't clear `long_name_tab' member.
123         (dict_get_varname_block) Removed.
124         (dict_add_longvar_entry) Removed.
125         (free_nte) Removed.
126         (dict_destroy) Don't destroy `long_name_tab' member.
127         (dict_create_var_from_short) Removed.
128         (dict_create_var_x) Removed.
129         (dict_create_var) Get rid of longname handling.
130         Clear short name.
131         (dict_clone_var) Get rid of longname parameter and longname
132         handling.
133         (dict_lookup_var) Get rid of longname handling.
134         (dict_reorder_var) New function.
135         (dict_rename_var) Clear short name.
136         (dict_rename_vars) Get rid of longname handling.  Clear short
137         names.
138         (dict_create_vector) Support long vector names.
139         (dict_lookup_vector) Use strcasecmp() instead of strcmp().
140         (quasi_base27) Removed.
141         (make_short_name) Removed.
142         (compare_strings) New function.
143         (hash_string) New function.
144         (dict_assign_short_names) New function.
145
146         * file-handle.q: (get_handle_with_name) Use strcasecmp() instead
147         of strcmp().
148         (get_handle_for_filename) Support long handle names.
149
150         * file-type.c: (struct col_spec) Make `name' fit long var names.
151         (cmd_file_type) Use strcasecmp() instead of strcmp().
152
153         * flip.c: (make_new_var) Rewrite.
154         (flip_sink_write) Use st_trim_copy() instead of strncpy().
155
156         * format.c: (parse_format_specifier_name) Use mm_case_compare()
157         instead of memcmp().
158
159         * get.c: (cmd_save_internal) Rephrase.
160         (rename_variables) Drop test for identical variable name.
161         (struct mtf_proc) Change `first', `last' to fit long var name.
162
163         * hash.c: (hsh_hash_case_string) New function for case-insensitive
164         string hashing.
165
166         * lexer.c: (restore_token) Use st_trim_copy() instead of
167         strncpy().
168         (lex_get) Don't uppercase string when copying into tokid.
169         (lex_put_back_id) Use st_trim_copy() instead of
170         strncpy().
171
172         * list.q: (determine_layout) Consider length of variable names in
173         choosing vertical layout.
174
175         * matrix-data.c: (cmd_matrix_data) Use strcasecmp() instead of
176         strcmp().
177         (string_to_content_type) Ditto.
178
179         * modify-vars.c: (compare_variables_given_ordering) Ditto.
180         (struct var_renaming) Change `new_name' to fit long var name.
181         (compare_var_renaming_by_new_name) Use strcasecmp() instead of
182         strcmp().
183
184         * pfm-read.c: (read_variables) Disallow system variables in system
185         files.
186         (write_variables) Call dict_assign_short_names() and use
187         short_name[] members.
188
189         * repeat.c: (internal_cmd_do_repeat) Use strcasecmp() instead of
190         strcmp().
191
192         * sfm-read.c: (sfm_open_reader) Rewrite code for long variable
193         map.  Reorder variables into same order as long variable map.
194         (read_variables) Set short name.
195
196         * sfm-write.c: (sfm_open_writer) Call dict_assign_short_names().
197         (write_variable) Use st_bare_pad_copy().
198         (write_longvar_table) Rewrite.
199
200         * str.c: (mm_case_compare) New function.
201
202         * sysfile-info.c: (compare_vectors_by_name) Use strcasecmp()
203         instead of strcmp().
204
205         * t-test.q: (tts_custom_groups) Remove redundant test.
206         (tts_custom_pairs) Ditto.
207
208         * var.h: (struct variable) Change `name' to fit long var names.
209         Remove `longname'.  Add `short_name' member.  Reorder some
210         variables.
211         (struct name_table_entry) Removed.
212         (struct vector) Change `name' to fit long vector names.
213
214         * vars-atr.c: (var_is_valid_name) Allow long var names.
215         (compare_var_names) Use strcasecmp() instead of strcmp().
216         (compare_var_ptr_names) Ditto.
217         (hash_var_name) Use hsh_hash_case_string().
218         (hash_var_ptr_name) Ditto.
219         (var_set_short_name) New function.
220         (var_clear_short_name) New function.
221         (var_set_short_name_suffix) New function.
222
223         * vars-prs.c: (parse_DATA_LIST_vars) Support long names.
224         Use strcasecmp() instead of strcmp().
225         (struct array_var_set) Removed `longname_tab'.
226         (array_var_set_lookup_var_idx) Drop longname_tab support.
227         (array_var_set_destroy) Don't destroy `longname_tab'.
228         (var_set_create_from_array) Don't create `longname_tab'.
229
230         * vector.c: (cmd_vector) Use strcasecmp() instead of strcmp().
231         Support long names.
232
233         * expressions/parse.c: (word_matches) Use mm_case_compare()
234         instead of memcmp().
235         (compare_strings) New function.
236         (lookup_function) Use compare_strings() instead of strcmp().
237         
238 Sun May  1 22:07:43 2005  Ben Pfaff  <blp@gnu.org>
239
240         * algorithm.c: (move_element) New function.
241
242 Sun May  1 22:05:35 2005  Ben Pfaff  <blp@gnu.org>
243
244         * aggregate.c: (parse_aggregate_functions) Always initialize
245         destvar.
246
247 Sun May  1 22:03:47 2005  Ben Pfaff  <blp@gnu.org>
248
249         * aggregate.c: (cmd_aggregate) Use dict_clone_var_assert().
250
251         * dictionary.c: (dict_clone) Ditto.
252         (dict_clone_var_assert) New function.
253
254         * get.c: (mtf_merge_dictionary) Use dict_clone_var_assert().
255
256 Sun May  1 15:05:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
257
258         * error.c: Added a string for the compiler version to the
259         request_bug_report_and_abort function.
260
261         * groff_font.c, font.c: Removed manpage(1) style references from 
262         comments, because RMS frowns upon them.
263
264 Thu Apr 28 18:52:06 2005  Ben Pfaff  <blp@gnu.org>
265
266         * expressions/parse.c: Improve previous fix for PR 12858 (LAG).
267
268 Fri Apr 29 09:28:00 WST 2005 John Darrington <john@darrington.wattle.id.au>
269
270         * expressions/parse.c: Added handler for OP_LAG_Vn and OP_LAG_Vs.  
271         Fixed bug [#12858] .
272
273 Wed Apr 27 12:42:34 WST 2005 John Darrington <john@darrington.wattle.id.au>
274
275         * loop.c recode.c repeat.c: Fixed a couple of instances of SHORT_NAME_LEN 
276         which should be LONG_NAME_LEN
277
278 Wed Apr 27 07:43:50 WST 2005 John Darrington <john@darrington.wattle.id.au>
279
280         * command.def echo.c:  Added the ECHO command.
281
282 Mon Apr 25 22:55:59 2005  Ben Pfaff  <blp@gnu.org>
283
284         Finish fixing MATCH FILES (PR 11677).
285
286         * get.c: (trim_dictionary) Rewrite in terms of drop_variables(),
287         keep_variables(), rename_variables().
288         (drop_variables) New function.
289         (keep_variables) New function.
290         (struct mtf_file) Rename `in' to `in_name'.  Add `in_var'.
291         (cmd_match_files) Deal with in_var.  Use drop_variables(),
292         keep_variables().  When IN is specified, require BY.  Set master
293         variables after master dictionary is complete.  Add IN variables
294         after master dictionary is complete.
295         (mtf_free_file) Free `in_name'.
296         (mtf_delete_file_in_place) Set in_var value to 0.
297         (mtf_read_nonactive_records)  Rephrase.
298         (mtf_processing) Support IN.  Rephrase.  Fix bugs.
299         (mtf_merge_dictionary) Don't set master variables; we do that
300         later now.
301         (get_master) Don't insist that there's a master variable.
302         
303 Mon Apr 25 22:55:22 2005  Ben Pfaff  <blp@gnu.org>
304
305         Kluge to make some variable renaming sort of work.
306         Needs real fix.
307
308         * dictionary.c: (dict_rename_var) Call dict_add_longvar_entry().
309
310 Mon Apr 25 22:52:28 2005  Ben Pfaff  <blp@gnu.org>
311
312         Add functions for comparing sets of variables between cases.
313         Use the functions.
314
315         * case.c: (case_compare) New function.
316         (case_compare_2dict) New function.
317         
318         * aggregate.c: (struct agr_proc) Remove `prev_break' member.  Add
319         `break_case'.
320         (cmd_aggregate) Nullify break_case.  Don't call
321         initialize_aggregate_info().
322         (agr_destroy) Destroy break_case.
323         (aggregate_single_case) Rewrite.  Use case_compare().
324         (dump_aggregate_info) Copy from break_case into output.
325         (initialize_aggregate_info) Copy break_case from input.
326
327         * get.c: (mtf_compare_BY_values) Use case_compare_2dict().
328
329         * vfm.c: (equal_splits) Use case_compare().
330
331 Sat Apr 23 17:01:04 WST 2005 John Darrington <john@darrington.wattle.id.au>
332
333         * dictionary.c vars-prs.c sfm-write.c: Fixed some memory leaks
334
335 Sun Apr 17 23:08:15 2005  Ben Pfaff  <blp@gnu.org>
336
337         Start work on fixing MATCH FILES.
338
339         * get.c: (enum operation) Remove OP_MATCH.
340         (trim_dictionary) Change return value to bool.  Don't support
341         OP_MATCH.
342         (struct mtf_file) Remove `first', `last' members.
343         (struct mtf_proc) Add `first', `last' members.  Change mtf_case
344         from `struct ccase *' to `struct ccase'.  Remove `by' member.
345         (cmd_match_files) Essentially rewrite.
346         (mtf_free) Don't free `by' member.  Destroy `mtf_case' member.
347         (mtf_read_nonactive_records) mtf_ parameter is not unused.
348         (mtf_processing) Ditto.  Also rephrase some code.
349         (mtf_merge_dictionary) Rewrite for easy comprehension.  
350
351 Sun Apr 17 23:06:00 2005  Ben Pfaff  <blp@gnu.org>
352
353         * matrix-data.c: (wr_output_data) [DEBUGGING] Fix compilation
354         error.
355
356         * q2c.c: (dump_token) [DEBUGGING] Fix compilation error.
357         
358 Thu Apr 14 2005 John Darrington
359
360         * var-display.c: New file.
361
362         * format.h var.h sfm-read.c sfm-write.c dictionary.c :  Added 
363           display_width, measure and alignment parameters to variables.
364
365         * aggregate.c command.def compute.c count.c data-list.c descript.c
366           dictionary.c dictionary.h expr-prs.c file-type.c flip.c get.c 
367           lexer.c lexer.h loop.c modify-vars.c pfm-read.c recode.c repeat.c 
368           sfm-read.c sfm-write.c sfm-write.h sfmP.h val-labs.c val.h var.h 
369           vars-prs.c vector.c :  
370               - Replaced literal constants representing maximum variable name 
371                 length with macro definitions. 
372               - Added support for long variable names.
373               - Changed lexer such that it no longer makes tokens upper
374                 case, but relies upon case insensitive behaviour of commands.
375
376 Mon Apr  4 22:27:34 2005  Ben Pfaff  <blp@gnu.org>
377
378         * aggregate.c: (parse_aggregate_functions) If dict_create_var()
379         fails, don't dereference the resulting null pointer (PR 12427).
380         Also, fix double free error.
381
382 Sat Mar 19 23:06:02 2005  Ben Pfaff  <blp@gnu.org>
383
384         * aggregate.c: (parse_aggregate_functions) Fix N_NO_VARS format.
385         (accumulate_aggregate_info) Set int1 to 1 for SUM.
386         (dump_aggregate_info) Only make SUM non-missing if there was at
387         least one variate.
388
389 Sat Mar 19 14:48:19 2005  Ben Pfaff  <blp@gnu.org>
390
391         * aggregate.c: (dump_aggregate_info) Properly test whether the
392         destination variable is numeric, when making the result
393         system-missing for columnwise missing values.
394
395 Mon Mar 14 21:52:34 2005  Ben Pfaff  <blp@gnu.org>
396
397         * misc.h: Remove GCC specializations.
398
399 Mon Mar 14 21:07:23 2005  Ben Pfaff  <blp@gnu.org>
400
401         Make sort stable (PR 12313).
402         
403         * sort.c: Don't need to include some headers anymore.
404         (static var min_buffers) New variable.
405         (static var max_buffers) New variable.
406         (static var allow_internal_sort) New variable.
407         (cmd_sort_cases) Add test mode.
408         (sort_execute) Rephrase.
409         (do_internal_sort) Don't try internal sorting if
410         allow_internal_sort is set.
411         (struct external_sort) Renamed `initial_runs' to `runs' and
412         updated all references.
413         (macro MIN_BUFFER_TOTAL_SIZE_RECS) Removed.
414         (macro MIN_BUFFER_SIZE_BYTES) Removed.
415         (macro MIN_BUFFER_SIZE_RECS) Removed.
416         (compare_initial_runs) Removed.
417         (struct record_run) Add member `idx'.
418         (write_initial_runs) Pass increasing values to process_case() as
419         index.
420         (process_case) Add `idx' parameter and use it to initialize new
421         `idx' member.
422         (allocate_cases) Limit allocated buffers to max_buffers.
423         (compare_record_run) Use new `idx' member for last resort
424         comparison, for stability.
425         (end_run) Call casefile_sleep() on irs->casefile, to prevent
426         running out of file descriptors.
427         (struct merge_state) Removed.
428         (merge) Don't need to allocate cases.  Always use MAX_MERGE_ORDER
429         unless we have fewer runs left.  Always merge consecutive runs,
430         for stability.  Return the final run.
431         (mod) Removed.
432         (choose_merge) New function.
433         (merge_once) Rewritten.
434
435 Mon Mar 14 21:05:42 2005  Ben Pfaff  <blp@gnu.org>
436
437         * cmdline.c: (static var testing_mode) Move into
438         parse_command_line().
439         
440 Mon Mar 14 21:05:13 2005  Ben Pfaff  <blp@gnu.org>
441
442         * algorithm.c: (remove_range) New function.
443         (remove_element) New function.
444
445         * dictionary.c: (dict_delete_var) Use remove_element().
446
447         * flip.c: (cmd_flip) Ditto.
448
449 Sun Mar 13 22:52:05 2005  Ben Pfaff  <blp@gnu.org>
450
451         * file-handle.q: (struct file_handle) `open_mode' should not be
452         const.
453         
454 Sun Mar 13 22:40:54 2005  Ben Pfaff  <blp@gnu.org>
455
456         First phase of making SORT CASES stable (PR 12313).
457
458         * sort.c: (struct indexed_case) New structure.
459         (do_internal_sort) Rewrite to make internal sorting stable.
460         (compare_case_dblptrs) Removed.
461         (compare_indexed_cases) New function.
462
463 Sun Mar 13 22:38:40 2005  Ben Pfaff  <blp@gnu.org>
464
465         Clean-ups.
466
467         * casefile.c: (casereader_read_xfer_assert) New function.
468
469         * dictionary.c: (dict_compact_case) New function.
470
471         * flip.c: (struct flip_pgm) New member idx_to_fv.
472         (cmd_flip) Initialize idx_to_fv member.
473         (destroy_flip_pgm) Free idx_to_fv member.
474         (flip_sink_write) Use struct flip_pgm member instead of case_sink
475         member.
476         (flip_sink_write) Ditto.
477
478         * vfm.c: (write_case) Use dict_compact_case() instead of
479         compact_case().
480         (compact_case) Removed.
481         (storage_source_create) Removed `dict' parameter.  All references
482         updated.
483
484         * vfm.h: (struct case_source) Removed `value_cnt' member.  All
485         references removed.
486         (struct case_sink) Removed `dict', `idx_to_fv' members.  All
487         references removed.
488
489 Sun Mar 13 22:35:55 2005  Ben Pfaff  <blp@gnu.org>
490
491         More AGGREGATE fixes.
492
493         * aggregate.c: (accumulate_aggregate_info) Implement NMISS and
494         NUMISS for strings.  Fix FOUT, POUT, FGT, FLT, FIN, FOUT for
495         strings.
496         (initialize_aggregate_info) Fix initialization for MIN, MAX for
497         strings.
498
499 Sat Mar 12 23:26:21 2005  Ben Pfaff  <blp@gnu.org>
500
501         Start work on testing and debugging AGGREGATE.
502
503         * aggregate.c: (cmd_aggregate) Use discrete bool variables instead
504         of a bit-map.  Require proper subcommand ordering.  Make OUTFILE
505         subcommand mandatory.
506         (parse_aggregate_functions) Check that PIN, POUT, FIN, FOUT
507         functions' arguments are in the correct order and swap them if
508         not.
509         (accumulate_aggregate_info) Make SUM include weights.  Add various
510         string functions.
511         (dump_aggregate_info) Add various string functions.
512         (initialize_aggregate_info) Initialize int1 for MIN, MAX.
513
514         * sort.c: (sort_parse_criteria) Add parameter for returning
515         whether any directions were specified.  All callers updated.
516
517 Sun Mar 13 14:54:27 WST 2005 John Darrington <john@darrington.wattle.id.au>
518
519         * t-test.q: Fixed erroneous logic in compare_group_binary.
520
521 Sat Mar 12 13:29:21 2005  Ben Pfaff  <blp@gnu.org>
522
523         * split-file.c: (cmd_split_file) Ignore LAYERED and SEPARATE
524         keywords (PR 11628).
525
526 Sat Mar 12 13:17:12 2005  Ben Pfaff  <blp@gnu.org>
527
528         * vfm.c: (procedure_with_splits) Fix PR 11492: end_func() must be
529         called *before* close_active_file().
530
531 Sat Mar 12 12:20:57 2005  Ben Pfaff  <blp@gnu.org>
532
533         * file-handle.q: (struct file_handle) Change open_mode from
534         character pointer to 3-char array, for safety.  Updated all
535         references.
536
537 Sat Mar 12 12:15:49 2005  Ben Pfaff  <blp@gnu.org>
538
539         Thanks to Ben Kujala <bkujala@oregonchildcare.org> for reporting
540         these bugs.
541         
542         * pfm-read.c: (read_header) Improve error message for many cases
543         in which the input is not actually a portable file.
544
545         * file-handle.q: (fh_open) When we give an error message, actually
546         return NULL.
547
548 Fri Mar 11 11:50:30 2005  Ben Pfaff  <blp@gnu.org>
549
550         * format.c: (check_common_specifier) New function for checks
551         common to check_input_specifier() and check_output_specifier().
552         (check_input_specifier) Use check_common_specifier().
553         (check_output_specifier) Use check_common_specifier().
554         (check_string_specifier) Removed.
555         (check_specifier_type) New function.
556         (check_specifier_width) New function.
557         (get_format_var_width) Fix bug.
558
559         * formats.c: (internal_cmd_formats) Only accept numeric variables.
560
561         * lexer.c: (check_id) Rename lex_id_to_token(), make public,
562         update all references.  Make case-insensitive.
563
564         * pfm-read.c: Essentially rewrite the whole file.  Now much
565         cleaner.
566
567         * print.c: (check_string_width) New function.
568         (fixed_parse_compatible) Use check_string_width(),
569         check_specifier_type().
570         (dump_fmt_list) Ditto.
571
572         * str.c: (st_trim_copy) New function.
573         (st_uppercase) New function.
574
575         * vars-atr.c: (var_is_valid_name) New function.
576         
577         * expressions/parse.c: (type_coercion_core) Use
578         check_specifier_type().
579         
580 Fri Mar 11 11:31:24 2005  Ben Pfaff  <blp@gnu.org>
581
582         * expressions/evaluate.c: (cmd_debug_evaluate) Fix memory leaks.
583
584         * expressions/parse.c: (no_match) Ditto.
585
586 Wed Mar  9 09:54:27 2005  Ben Pfaff  <blp@gnu.org>
587
588         * Makefile.am: (pspp_LDADD) Add libgsl-extras.a.
589
590         * expressions/helpers.c: (struct func_params) Removed.
591         (generalized_idf) Removed.
592         (cdf_beta) Removed.
593         (idf_beta) Removed.
594         (idf_fdist) Use gslextras_cdf_beta_Pinv() instead of idf_beta().
595
596         * expressions/operations.def: Implement IDF.BETA, CDF.BINOM,
597         CDF.GEOM, CDF.HYPER, CDF.NEGBIN, CDF.POISSON using gsl-extras.
598         Implement SIG.F, which I had overlooked previously.
599
600 Tue Mar  8 12:47:53 WST 2005 John Darrington <john@darrington.wattle.id.au>
601
602         * command.c command.def glob.[ch] cmdline.c: Made DEBUG cmds
603         available only in testing mode.
604
605 Sun Mar  6 23:25:40 2005  Ben Pfaff  <blp@gnu.org>
606
607         * data-in.c: Use `bool' throughout, where relevant.
608
609 Sun Mar  6 19:52:22 2005  Ben Pfaff  <blp@gnu.org>
610
611         DATA LIST with free-field formats should not have implied decimal
612         places (PR 12035).  Also clean up data-in.c a bit.
613
614         * data-in.h: (enum) Add DI_IMPLIED_DECIMALS.
615
616         * data-in.c: (apply_implied_decimals) New function.
617         (parse_numeric) Don't adjust exponent if DI_IMPLIED_DECIMALS not
618         set.  Also, get rid of gotos.
619         (parse_Z) Use apply_implied_decimals() if the field doesn't
620         contain a decimal point.
621         (parse_N) Use apply_implied_decimals().
622         (parse_IB) Ditto.
623         (parse_PIB) Ditto.
624         (parse_P) Ditto.
625         (parse_PK) Ditto.
626         (to_roman) Removed.
627         (parse_enum) New function.
628         (macro CHAR_IS_ROMAN) Removed.
629         (macro ROMAN_VALUE) Removed.
630         (parse_month) Use parse_enum().
631         (parse_weekday) Use parse_enum().
632         (parse_DATETIME) Use long for weekday.
633
634         * data-list.c: (read_from_data_list_fixed) Use
635         DI_IMPLIED_DECIMALS.
636
637 Sun Mar  6 17:07:20 2005  Ben Pfaff  <blp@gnu.org>
638
639         When the lexer sees something like `-5' in the input, it has to
640         decide whether it's a negative numeric constant token or a '-'
641         token followed by a positive numeric constant token.  It always
642         decides on the former, and then the parser can call
643         lex_negative_to_dash() if it wants the latter.  However, this
644         doesn't work for the case of `-0', because negative zero is
645         (portably) indistinguishable from positive zero.  So now we divide
646         T_NUM into two tokens, T_POS_NUM and T_NEG_NUM, to make the
647         distinction clear.  This requires a little bit of extra effort,
648         because there were several references to T_NUM in the code base.
649         
650         * lexer.c: (lex_get) Use T_NEG_NUM and T_POS_NUM to distinguish
651         positive and negative numeric constants.
652         (lex_double_p) Renamed lex_is_number().  Changed return type to
653         bool.  Updated all relevant references to T_NUM to instead use
654         this function.
655         (lex_double) Renamed lex_number().  All references updated.
656         (lex_integer_p) Renamed lex_is_integer().  Changed return type to
657         bool.  All references updated.
658         (lex_token_representation) Understand T_NEG_NUM and T_POS_NUM.
659         (lex_negative_to_dash) Ditto.
660         (dump_token) Ditto.
661         
662         * lexer.h: (enum) Add T_POS_NUM, T_NEG_NUM.  Remove T_NUM.
663
664 Sun Mar  6 22:09:20 2005  Ben Pfaff  <blp@gnu.org>
665
666         * expressions/operations.def: (NUMBER) Use DI_IMPLIED_DECIMALS.
667
668 Sun Mar  6 19:33:24 2005  Ben Pfaff  <blp@gnu.org>
669
670         * expressions/operations.def: (VEC_ELEM_NUM) Treat user-missing
671         values as system-missing.
672
673         * expressions/parse.c: (parse_vector_element) Fix order of
674         arguments in call to expr_allocate_binary().
675
676 Sun Mar  6 17:51:05 2005  Ben Pfaff  <blp@gnu.org>
677
678         * expressions/optimize.c: (optimize_tree) Fix optimization bug for
679         x**2.
680
681         * expressions/parse.c: (type_coercion_core) Set *node to NULL on
682         failure, as indicated by function comment.
683         (parse_binary_operators) Always return NULL on type_coercion()
684         failure.  Should have been doing this anyway, but bug in
685         type_coercion_core() filtered through.
686         (parse_add) Fix typo in user message.
687         (parse_primary) Understand T_NEG_NUM and T_POS_NUM.
688
689 Sun Mar  6 10:47:13 2005  Ben Pfaff  <blp@gnu.org>
690
691         * expressions/operations.def: Add VALUE function.
692
693         * expressions/parse.c: (parse_function) Need an unary composite
694         node for variables in A TO B, not a variable node.  Use
695         allocate_unary_variable().
696         (parse_primary) Use allocate_unary_variable().
697         (allocate_unary_variable) New function.
698
699 Thu Mar  3 23:53:32 2005  Ben Pfaff  <blp@gnu.org>
700
701         * expressions/PSPP_expressions.pm: Renamed it back to generate.pl
702         but fixed the real problem that was preventing the build from a
703         separate directory.  I liked it my way better ;-)
704         
705 Thu Mar  3 23:17:51 2005  Ben Pfaff  <blp@gnu.org>
706
707         * expressions/parse.c: (expr_parse) Fix parameter type.  Thanks to
708         John Darrington <john@darrington.wattle.id.au> for reporting this
709         bug.
710
711 Thu Mar  3 22:10:25 WST 2005 John Darrington <john@darrington.wattle.id.au>
712
713         * expressions/Makefile.am expressions/evaluate.h.pl
714           expressions/evaluate.inc.pl expressions/operations.h.pl
715           expressions/optimize.inc.pl expressions/parse.inc.p:
716
717           Renamed generate.pl to PSPP_expressions.pm and adjusted *.pl
718           to suit. 
719
720           Fixed everything so that it can be built from an arbitrary
721           directory.
722         
723 Thu Mar  3 22:08:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
724
725         * Makefile.am : Fixed up CLEANFILES target.
726
727 Mon Feb 28 23:49:56 2005  Ben Pfaff  <blp@gnu.org>
728
729         * str.h: Changed `struct len_string' to `struct fixed_string', a
730         more accurate name.  Updated all references.
731
732 Mon Feb 28 23:35:30 2005  Ben Pfaff  <blp@gnu.org>
733
734         Redo calendar support.  Should now be bug-for-bug compatible.
735         
736         * calendar.c: New file.
737
738         * calendar.h: New file.
739
740         * data-in.c: Use new calendar functions.
741         (parse_sign) Change sense of return value.
742         (calendar_error) New function.
743         (ymd_to_ofs) New function.
744         (ymd_to_date) New function.
745         (parse_DATE) Use new function.
746         (parse_ADATE) Ditto.
747         (parse_EDATE) Ditto.
748         (parse_SDATE) Ditto.
749         (parse_JDATE) Ditto.
750         (parse_QYR) Ditto.
751         (parse_MOYR) Ditto.
752         (parse_WKYR) Ditto.
753         (parse_TIME) Ditto.
754         (parse_DTIME) Ditto.
755         (parse_DATETIME) Ditto.
756
757         * data-out.c: (convert_date) Use new calendar functions.
758
759         * error.c: (err_vmsg) Changed interface to be more sensible.
760         Updated all callers.
761         (dump_message) Don't double new-lines (why did we do this
762         anyway?).
763
764 Mon Feb 28 23:30:25 2005  Ben Pfaff  <blp@gnu.org>
765
766         * sfmP.h: (macro flt64) Moved here from pref.h.orig.
767         (macro FLT64_MAX) Moved here from pref.h.orig.
768
769 Mon Feb 28 23:28:01 2005  Ben Pfaff  <blp@gnu.org>
770
771         * set.q: Support SET EPOCH.
772         (static var set_epoch) New var.
773         (aux_stc_custom_epoch) New function.
774         (stc_custom_epoch) New function.
775         (get_epoch) New function.
776         (stc_custom_pager) [USE_INTERNAL_PAGER] Fix bug.
777
778         * format.c: Make it possible just to check whether a specifier is
779         valid without emitting an error message.
780         (parse_format_specifier_name) Change interface, update all
781         callers.
782         (check_input_specifier) Ditto.
783         (check_output_specifier) Ditto.
784         (parse_format_specifier) Ditto.
785
786 Mon Feb 28 23:24:08 2005  Ben Pfaff  <blp@gnu.org>
787
788         * command.def: Add DEBUG POOL.
789
790         * pool.c: (pool_destroy) Fix bug in deleting this pool from its
791         parent.
792         (pool_clear) Properly account for size of pool gizmo.
793         (pool_realloc) Ditto.
794         (pool_clone) New function.
795
796         * pool.h: Mark our allocation functions MALLOC_LIKE.
797
798 Mon Feb 28 23:21:26 2005  Ben Pfaff  <blp@gnu.org>
799
800         * Makefile.am: Move many definitions into new top-level
801         Make.build.  Add expressions to SUBDIRS.  Add calendar.c,
802         calendar.h.  Remove expr-evl.c, expr-opt.c expr-prs.c, expr.h,
803         exprP.h, expr.def.
804
805         * case.c: (case_resize) New function.
806         (case_swap) New function.
807
808         * casefile.c: Include mkfile.h.
809
810 Fri Feb 25 21:11:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
811
812         * sfm-read.c: Fixed a buglet which caused a crash when trying
813         to read a non-existent file.
814
815 Sun Feb 13 16:11:13 2005  Ben Pfaff  <blp@gnu.org>
816
817         Fix PR 11955.
818
819         * aggregate.c: (parse_aggregate_functions) Code cleanup.
820         Important part: get rid of spurious copying of function->format to
821         destvar->print and destvar->write.
822
823 Fri Feb 11 00:08:36 2005  Ben Pfaff  <blp@gnu.org>
824
825         Fix PR 11916, which was confusing a variable's `index' member
826         with the variable's position in a var_set.  Although these are
827         usually the same, they are not for array `var_set's.
828         
829         Took advantage of this bug as an opportunity to clean up and
830         rewrite parse_var_set_vars().
831
832         * vars-prs.c: (parse_vs_variable_idx) New function.
833         (parse_vs_variable) Reimplement in terms of
834         parse_vs_variable_idx().
835         (parse_var_idx_class) New function.
836         (add_variable) New function.
837         (add_variables) New function.
838         (parse_var_set_vars) Rewritten.
839         (struct var_set) Change `lookup_var' member that returns a
840         variable into `lookup_var_idx' member that returns an int.
841         Updated the var set implementations in obvious corresponding ways.
842         Used compare_var_ptr_names(), hash_var_ptr_name() just added.
843         
844 Fri Feb 11 00:06:03 2005  Ben Pfaff  <blp@gnu.org>
845
846         Use our global variable compare & hash functions and give them
847         better names.  Add similar functions for dealing with double
848         pointers to variables.
849         
850         * vars-atr.c: (compare_variables) Renamed compare_var_names().
851         (hash_variable) Renamed hash_var_name().
852         (compare_var_ptr_names) New function.
853         (hash_var_ptr_name) New function.
854         
855         * t-test.q: (cmd_t_test) Use global compare_var_names(),
856         hash_var_name().
857         (compare_var_name) Removed.
858         (hash_var_name) Removed.
859
860 Fri Feb 11 00:04:39 2005  Ben Pfaff  <blp@gnu.org>
861
862         Fix dictionary bug.
863         
864         * dictionary.c: (compare_variable_dblptrs) Rename
865         compare_var_ptrs() and fix it to properly dereference the double
866         pointers.
867
868 Mon Feb  7 09:58:15 WST 2005 John Darrington <john@darrington.wattle.id.au>
869
870         crosstabs.q examine.q oneway.q q2c.c:  Added a q2c feature to 
871         declare subcommands as mandatory.  Closed bug #11843
872
873 Sat Feb  5 20:35:10 WST 2005 John Darrington <john@darrington.wattle.id.au>
874         
875         * getline.c command.[ch] command.def:  Added (very rudimentary)
876         support for line  completion when in interactive mode.  Partially 
877         addresses bug #11693
878         
879 Mon Jan 31 09:52:51 WST 2005 John Darrington <john@darrington.wattle.id.au>
880
881         * examine.q factor_stats.c oneway.q output.c pfm-read.c: Fixed some
882         problems revealed by valgrind.
883
884
885 Wed Jan 26 11:44:11 WST 2005 John Darrington <john@darrington.wattle.id.au>
886
887         * set.q: Affixed a fix to the previous fix such that we'll be OK now
888         whether or not PAGER is set.
889
890 Wed Jan 26 09:25:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
891
892         * set.q: Copied the string produced by getenv("PAGER") thus avoiding
893         "invalid free" errors.  Hopefully fixes bug #11722
894
895         * compute.c expr-prs.c: Check that lvalues are populated before 
896         attempting to destroy them.  Closes bug #11676
897
898 Tue Jan 25 21:01:43 WST 2005 John Darrington <john@darrington.wattle.id.au>
899
900         * aggregate.c: Initialised the complete agr_proc structure.
901         Closes bug #11675
902
903
904 Sun Jan 23 23:02:21 2005  Ben Pfaff  <blp@gnu.org>
905
906         * print.c: (print_trns_free) Close the dfm writer if there is one,
907         fixing a memory leak.
908
909 Mon Jan 24 12:24:36 WST 2005 John Darrington <john@darrington.wattle.id.au>
910
911         * glob.c oneway.q q2c.c t-test.q vfm.c: Still *more* memory leaks 
912         fixed.
913
914
915 Fri Jan 21 19:54:14 WST 2005 John Darrington <john@darrington.wattle.id.au>
916
917         * linked-list.[ch] Added
918
919         * examine.q file-handle.[hq] font.h glob.c groff-font.c postscript.c 
920           set.q:    Yet more memory leaks
921
922 Tue Jan 18 23:12:40 WST 2005 John Darrington <john@darrington.wattle.id.au>
923
924         * t-test.q examine.q : More memory leaks fixed.
925
926 Tue Jan 18 19:26:59 WST 2005 John Darrington <john@darrington.wattle.id.au>
927
928         * examine.q  factor_stats.[ch] get.c pfm-read.c: Plugged numerous
929         memory leaks.
930
931 Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
932
933         * ascii.c cartesian.c casefile.c chart.h devind.c 
934           examine.q frequencies.q
935           html.c output.h piechart.c plot-chart.c plot-hist.c
936
937           Integrated the chart rendering into the output stream
938           (currently only works for html).
939           
940           Removed gratuitous use of ifndef NO_CHARTS, and replaced with
941           dummy-chart.c for compiling without charts.
942
943         * mkfile.[ch] Created.  
944
945         * som.[ch] tab.[ch]: Changed name of som_table to som_entity
946         Added type element so we can tell if it's a chart or a table.
947
948         * chart.h examine.q piechart.c plot-chart.c plot-hist.c: changed the 
949         API of charts to be more like that of tables.
950
951 Thu Jan 13 21:00:02 WST 2005 John Darrington <john@darrington.wattle.id.au>
952
953         * casefile.c main.c: Moved the SIGINT handler from casefile.c to
954         main.c. Removed the handler for SIGQUIT.
955
956 Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
957
958         * casefile.c: Added a signal handler to delete temp files on 
959         SIGINT and SIGQUIT
960
961         * permissions.c Inhibited the PERMISSIONS command when SAFER is on.
962
963         * command.def Added a lot more unimplemented commands.
964
965         * copyleft.[ch] cmdline.c Moved legal information to copyleft.c
966
967 Sat Jan  8 23:58:34 2005  Ben Pfaff  <blp@gnu.org>
968
969         * sort.c: (compare_initial_runs) Needed additional level of
970         dereferencing.
971         (merge_once) Fix plenty of stupid mistakes.
972
973 Sat Jan  8 23:55:27 2005  Ben Pfaff  <blp@gnu.org>
974
975         * casefile.c: (casefile_sleep) Need to flush_buffer() after
976         calling casefile_to_disk() or we will lose the last block in the
977         file if the casefile started out as disk-based.
978         (casefile_get_reader) Initialize reader->destructive to 0.
979         (cmd_debug_casefile) Add new test pattern.
980         (test_casefile) Define new test pattern to make sure
981         casefile_sleep() works properly.
982
983 Fri Jan  7 08:00:05 WST 2005 John Darrington <john@darrington.wattle.id.au>
984
985         * Makefile.am chart.[ch]  histogram.[ch] piechart.c (Modified);
986           plot-hist.c plot-chart.c (Added) Reorganised these files in an
987           attempt to seperate the creation and processing of charts from their
988           actuall renedering.
989
990         * examine.q frequencies.q generated charts conditional upon the NO_CHARTS
991           macro.
992
993 Thu Jan  6 18:48:58 WST 2005 John Darrington <john@darrington.wattle.id.au>
994
995         * main.c Added a signal handler for SIGFPE
996
997         * sort.c Somewhat more robust fix to the previous entry.
998
999 Wed Jan  5 21:23:31 2005  Ben Pfaff  <blp@gnu.org>
1000
1001         * sort.c: (merge) Fix assertion for proper Huffman merge pattern:
1002         0 == 1 modulo 1.  See Knuth 5.4.9 (vol. 3, 2nd ed.,
1003         pp. 361).  Thanks to John Darrington <john@cellform.com.au> for
1004         reporting the bug.
1005
1006 Wed Jan  5 22:42:26 WST 2005 John Darrington <john@darrington.wattle.id.au>
1007
1008         * case.h Fixed bug # 11307
1009         
1010 Wed Jan  5 08:30:48 WST 2005 John Darrington <john@darrington.wattle.id.au>
1011
1012         * val-labs.c Fixed bug which caused a crash if VALUE LABELS had
1013         a trailing slash.
1014
1015 Mon Jan  3 17:44:37 2005  Ben Pfaff  <blp@gnu.org>
1016
1017         * pfm-read.c: (read_variables) Remove direct manipulation of
1018         v->aux, which is no longer needed.  Fixes PR 11483.
1019
1020 Sat Jan  1 19:01:16 WST 2005 John Darrington <john@darrington.wattle.id.au>
1021
1022         * data-list.c Fixed a bug in parsing delimiters.
1023
1024         * group.c vars-atr.c Fixed buglet in hash/compare functions for alpha
1025         values.
1026
1027         * percentiles.c Properly handled calculation of Tukey hinges where
1028         the number of data is small.
1029
1030         * oneway.q Used the generic value_to_string function for independent
1031         variable instead of trying to do it ourselves.
1032
1033         * box-whisker.c Fixed a buglet which caused a crash if the number of
1034         data was zero
1035
1036
1037 Fri Dec 31 16:47:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1038
1039         * examine.q box-whisker.c chart.h Implemented boxplots in EXAMINE
1040
1041         * percentiles.c Fixed some bugs when calculating percentiles when
1042         there's a small number of cases.
1043
1044 Wed Dec 29 08:18:08 WST 2004 John Darrington <john@darrington.wattle.id.au>
1045
1046         * percentiles.[ch] Added. Calculates percentiles and Tukey hinges
1047
1048         * examine.q factor_stats.[ch]  Added calculation of percentiles
1049
1050 Fri Dec 24 15:09:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
1051
1052         * t-test.q Fixed bug #11227 Made t-test work when the independent
1053         variable is alpha
1054
1055 Sat Dec 11 11:43:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1056
1057         * factor_stats.c Fixed calculation of trimmed mean under various
1058         special conditions.
1059
1060 Sat Dec  4 17:14:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1061
1062         * histogram.c chart.[ch] factor_stats.c frequencies.q
1063
1064         Added code to calculate sensible histogram ranges and limits.
1065
1066 Thu Dec  2 13:37:43 WST 2004 John Darrington <john@darrington.wattle.id.au>
1067
1068         * chart.h Updated to reflect many API changes.
1069
1070         * cartesian.c chart.c Moved the definitions of chart_write_{xy}scale from 
1071         cartesian.c and into chart.c
1072
1073         * factorstats.[ch] Added the histogram calculations
1074
1075         * casefile.c Removed an unused variable.
1076
1077         * frequencies.q examine.q histogram.c  Reworked the API for 
1078         histograms.
1079
1080         * piechart.c  Revised the API for piecharts.
1081
1082         * var.h  Moved the definitions of freq_tab and freq out of var.h
1083         and into frequencies.q where they belong.
1084         
1085 Tue Nov 30 21:10:20 2004  Ben Pfaff  <blp@gnu.org>
1086
1087         * flip.c: (flip_file) Check for off_t separately from fseeko(),
1088         using AC_TYPE_OFF_T.
1089
1090 Tue Nov 30 08:47:41 2004  Ben Pfaff  <blp@gnu.org>
1091
1092         * flip.c: (flip_file) If fseeko() is not available, use long int
1093         for off_t.  Thanks to "Marshall DeBerry" <mdb@radix.net> for
1094         reporting the problem.
1095
1096 Mon Nov 29 12:20:59 WST 2004 John Darrington <john@darrington.wattle.id.au>
1097
1098         * examine.q factor_stats.[ch] Changed stderr to se_mean to avoid
1099         conflict with stdio.
1100
1101 Sun Nov 21 10:32:41 WST 2004 John Darrington <john@darrington.wattle.id.au>
1102
1103         * var-labs.c (var_to_string) Now returns null if the variable is null
1104
1105         * value-labels.c (value_to_string) Made it return null if either the 
1106         value or the variable is null.
1107
1108         * hash.c (hsh_clear) Fixed a buglet.
1109
1110         * examine.q  factor_stats.[ch] Largely  rewrote, because I'd started 
1111         with  the wrong model.
1112
1113         * casefile.[ch] Added a function to return the casereader.case_idx 
1114         member
1115
1116         * examine.q  Implemented the extreme values results.
1117
1118 John Darrington <john@darrington.wattle.id.au>
1119
1120         * settings.h set.c glob.[ch] frequencies.q q2c.c error.c lexer.[ch] 
1121           output.[ch] getline.c 
1122
1123           Plugged some memory leaks
1124
1125 Mon Nov 15 23:47:40 2004  Ben Pfaff  <blp@gnu.org>
1126
1127         Adopt GSL random number generators, paving the way for providing
1128         the complete suite of random number generators on expressions.
1129         
1130         * Makefile.am: Remove random.c, random.h.
1131
1132         * random.c: Removed.
1133
1134         * random.h: Removed.
1135
1136         * algorithm.c: (algo_default_random) Use GSL functions.
1137
1138         * casefile.c: (test_casefile) Use GSL RNG functions.
1139
1140         * expr-evl.c: (expr_evaluate) Use GSL RNG functions for OP_NORMAL,
1141         OP_UNIFORM.
1142
1143         * sample.c: (cmd_sample) Use GSL RNG functions.
1144         (sample_trns_proc) Ditto.
1145
1146         * set.q: (static var set_seed) Removed.
1147         (static var seed_flag) Removed.
1148         (static var rng) New variable.
1149         (aux_stc_custom_seed) No seed value anymore, don't print anything.
1150         (stc_custom_seed) Use new seed functions.
1151         (seed_is_set) Removed.
1152         (get_rng) New function that composes the entire external
1153         interface.
1154         (set_rng) New function.
1155         (random_seed) New function.
1156
1157 Mon Nov 15 22:08:25 2004  Ben Pfaff  <blp@gnu.org>
1158
1159         * expr-evl.c: (expr_evaluate) Fix XDATE.JDAY formula.  Thanks to
1160         John Darrington <john@darrington.wattle.id.au> for reporting this
1161         bug.
1162
1163 Tue Nov 16 13:19:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
1164
1165         * permissions.c command.def Added the PERMISSIONS command
1166
1167 Mon Nov 15 01:33:32 2004  Ben Pfaff  <blp@gnu.org>
1168
1169         * q2c.c: (dump_header) Don't try to emit #includes at very top of
1170         output file because that will precede #include <config.h>, which
1171         is bad.
1172         (main) Add needed headers to /* (header) */ code.
1173
1174 Mon Nov 15 01:21:36 2004  Ben Pfaff  <blp@gnu.org>
1175
1176         Instead of making system or portable file readers responsible for
1177         dropping and reordering variables, make them read full cases and
1178         let the caller take care of any changes.
1179
1180         * get.c: New "case map" structure to handle this.  Use for GET,
1181         IMPORT, MATCH FILES.  Essentially rewrite the whole file.
1182
1183         * pfm-read.c: (pfm_read_case) Read into provided case.  Signature
1184         changed appropriately.
1185
1186         * sfm-read.c: (sfm_read_case) Ditto.
1187
1188 Mon Nov 15 00:47:45 2004  Ben Pfaff  <blp@gnu.org>
1189
1190         Decided that case_serialize() and case_unserialize() were too
1191         abstract.  Also we need a couple more functions to avoid excessive
1192         copying for data in/out fast paths.
1193
1194         * case.c: (case_serial_size) Removed.
1195         (case_serialize) Rename case_to_values() and make its argument
1196         explicitly an array of union values.
1197         (case_unserialize) Rename case_from_values() and make its argument
1198         explicitly an array of union values.
1199         (case_data_all) New function.
1200         (case_data_all_rw) New function.
1201
1202         * casefile.c: (struct casefile) Change buffer from array of
1203         unsigned char to array of union value for better accuracy.
1204         Redefine buffer_used and buffer_size in terms of values, not
1205         bytes.  Remove case_size because it is now redundant with
1206         value_cnt.  Fix up all references to these members.
1207
1208 Mon Nov 15 00:45:46 2004  Ben Pfaff  <blp@gnu.org>
1209
1210         * barchart.c: (struct subcat) Make `label' member const to silence
1211         GCC warning with -Wwrite-strings.
1212
1213         * cartesian.c: (struct dataset) Ditto.
1214
1215         * case.c: Don't re-define NDEBUG if already defined.
1216         Add lots of comments.
1217
1218         * str.c: Fix includes.
1219
1220         * crosstabs.q: Fix includes.
1221
1222         * examine.q: Fix includes.  Fix GCC warning about unused
1223         variables.
1224         
1225         * frequencies.q: (stat macro) Removed and replaced where used by
1226         its expansion.
1227
1228         * list.q: Fix includes.
1229
1230         * oneway.q: Fix includes.
1231
1232         * piechart.c: Fix includes.  Only define M_PI if not already
1233         defined.
1234
1235         * sfm-read.c: (bswap) New function.
1236         (bswap_int32) Write in terms of bswap.
1237         (bswap_flt64) Ditto.
1238
1239         * str.c: (ds_data) Add external definition here, needed because
1240         str.h has only an `extern inline' version.
1241
1242         * value-labels.c: Fix includes.
1243
1244 Mon Nov 15 00:40:55 2004  Ben Pfaff  <blp@gnu.org>
1245
1246         Instead of providing a system or portable file writer with a raw
1247         case in the format needed for output, provide it with a regular
1248         case.  The writer takes care of any needed translation.
1249
1250         * aggregate.c: Adopt new scheme for AGGREGATE.
1251         (struct agr_proc) sfm_agr_case member removed.
1252         (write_case_to_sfm) Removed because the new interface is easier to
1253         use.
1254
1255         * get.c: Adopt new scheme for SAVE, XSAVE, EXPORT.
1256
1257         * pfm-write.c: Implement new scheme.
1258
1259         * sfm-write.c: Ditto.
1260
1261 Mon Nov 15 00:32:24 2004  Ben Pfaff  <blp@gnu.org>
1262
1263         Instead of treating `struct file_handle' as a class to subclass
1264         into data files, system files, and portable files, instead use it
1265         as a helper that coordinates access.  Now it is opaque, too.
1266
1267         This means that most references to a struct file_handle are now
1268         changed into references to one of struct dfm_reader, struct
1269         dfm_writer, struct sfm_reader, struct sfm_writer, struct
1270         pfm_reader, or struct pfm_writer, according to what's being read
1271         or written.
1272
1273         Most related changes are only worth summarizing briefly.
1274
1275         * dictionary.c: (dict_clear) Destroy aux data in deleted
1276         variables.
1277         (dict_clear_aux) New function.
1278         (dict_create_var) Initialize aux, aux_dtor.
1279         (dict_delete_var) Destroy aux data in deleted variable.
1280
1281         * file-handle.h: (struct fh_ext_class) Removed.
1282         (struct file_handle) Removed.
1283         (fh_init_files) Removed.
1284
1285         * file-handle.q: Changed references to a handle's `private' member
1286         to direct references.
1287         (struct private_file_handle) Renamed file_handle.
1288         Add next, open_cnt, type, open_mode, aux members.
1289         (struct file_handle_list) Removed.
1290         (extern var inline_file) Removed.
1291         (static var file_handles) Changed from file_handle_list * to
1292         file_handle *.
1293         (create_file_handle) Initialize new members.
1294         (fh_close_handle) Removed.
1295         (mode_name) New function.
1296         (fh_open) New function.
1297         (fh_close) New function.
1298         (fh_parse_file_handle) Renamed fh_parse().
1299
1300         * glob.c: (init_glob) Remove fh_init_files() call.
1301         
1302         * aggregate.c: use sfm_writer.
1303         (create_sysfile) Removed because the new interface is simpler.
1304         
1305         * apply-dict.c: Use sfm_reader.
1306
1307         * data-list.c: Use dfm_reader.
1308
1309         * file-type.c: Use dfm_reader.
1310
1311         * get.c: Use sfm_reader, sfm_writer, pfm_reader, pfm_writer.
1312
1313         * inpt-pgm.c: Use dfm_reader.
1314
1315         * print.c: Use dfm_writer.
1316
1317         * sysfile-info: Use sfm_reader.
1318
1319         * dfm-read.c: Adopt new file handle infrastructure.
1320
1321         * dfm-write.c: Ditto.
1322
1323         * pfm-read.c: Ditto.
1324         
1325         * pfm-write.c: Ditto.
1326
1327         * sfm-read.c: Ditto.
1328
1329         * sfm-write.c: Ditto.
1330         
1331 Mon Nov 15 00:31:44 2004  Ben Pfaff  <blp@gnu.org>
1332
1333         Break dictionary functions into separate header file.
1334
1335         * dictionary.h: New file.
1336
1337         * var.h: Moved dict_*() functions to dictionary.h.
1338
1339 Mon Nov 15 00:30:33 2004  Ben Pfaff  <blp@gnu.org>
1340
1341         Get rid of procedure-specific union in struct variable, using
1342         instead a void * pointer and a destructor function.
1343
1344         Most related changes are only worth brief summaries.
1345
1346         * crosstabs.q: Fix includes.  Use new struct var_range in lieu of
1347         old p.crs member in struct variable.
1348         
1349         * frequencies.q: Fix includes.  Use new struct var_freqs in lieu
1350         of old p.frq member in struct variable.
1351
1352         * histogram.c: (draw_histogram) Takes new freq_tab arg because
1353         it's no longer possible to grab this from var->p.frq.
1354
1355         * piechart.c: (draw_piechart) Ditto.
1356
1357         * group.c: (group_proc_get) New function.
1358
1359         * levene.c: Use group_proc_get() in lieu of old p.grp_data member
1360         in struct variable.
1361
1362         * oneway.q: Ditto.
1363
1364         * t-test.q: Ditto.
1365
1366         * main.c: (execute_command) Clear aux data in default_dict after
1367         each command.  (It's debatable whether this should be done.)
1368
1369         * matrix-data.c: Use new struct mxd_var in lieu of old p.mxd
1370         member in struct variable.
1371
1372         * means.q: Get rid of integer mode, which is not included in
1373         recent SPSS and was the only code that wanted per-variable private
1374         data.
1375
1376         * var.h: (struct crosstab_proc) Removed.
1377         (struct frequencies_proc) Removed.
1378         (struct list_proc) Removed.
1379         (struct get_proc) Removed.
1380         (struct means_proc) Removed.
1381         (struct matrix_data_proc) Removed.
1382         (struct match_files_proc) Removed.
1383         (lots of enums) Removed.
1384         (struct variable) Removed members `p', `get'.  Add member
1385         `aux_dtor'.
1386
1387         * vars-atr.c: (var_attach_aux) New function.
1388         (var_detach_aux) New function.
1389         (var_clear_aux) New function.
1390         (var_dtor_free) New function.
1391         (discard_variables) Use NULL instead of inline_file.
1392
1393 Fri Nov 12 10:07:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
1394
1395         * value-labs.c  Fixed the implmentation of value_to_string, so 
1396         that it properly handles alpha values.
1397
1398         * oneway.q  Changed instances where labels were being probed manually, 
1399         to use the canonical {var,value}_to_string functions
1400
1401 Thu Nov 11 21:01:31 WST 2004 John Darrington <john@darrington.wattle.id.au>
1402
1403         * examine.q cartesian.c chart.[ch]   Added normal and detrended normal
1404         plots.  Changed the API of the cartesian plot to be a much lower level
1405         thing.
1406
1407 Sun Nov  7 17:25:04 WST 2004 John Darrington <john@darrington.wattle.id.au>
1408
1409         * examine.q Added some of the parametric calculations
1410
1411         * factor_stats.[ch]  Created
1412         
1413 Sat Nov  6 21:24:31 WST 2004 John Darrington <john@darrington.wattle.id.au>
1414
1415         * examine.q  Changed the definition of factors to be a composite, and
1416         dealt with the consequences.
1417
1418 Sat Nov  6 20:40:38 WST 2004 John Darrington <john@darrington.wattle.id.au>
1419
1420         * examine.q Fixed problem where examine wasn't dealing properly with 
1421         splits
1422
1423 Sat Nov  6 14:49:47 WST 2004 John Darrington <john@darrington.wattle.id.au>
1424
1425         * oneway.q Fixed problem where oneway wasn't dealing properly with 
1426         splits
1427
1428 Thu Nov  4 11:09:01 WST 2004 John Darrington <john@darrington.wattle.id.au>
1429
1430         * q2c.c examine.q  Fixed a bug (feature?) whereby arrays in the
1431         command which had settings didn't get the appropriate code
1432         generated.
1433
1434         * val.h value-labels.[ch] var-labs.c Added v*to_string functions
1435         to convert variables/values to strings.
1436
1437         * examine.q  Added framework for the EXAMINE command.
1438
1439 Mon Nov  1 12:46:17 WST 2004 John Darrington <john@darrington.wattle.id.au>
1440
1441         * q2c.c frequencies.q set.q t-test.q  Fixed the q2c parsing of DBL 
1442         subcommand types.  Changed frequencies.q to use it rather then the 
1443         custom parser.  Dealt with the consequences.  Added a test for NTILES
1444         subcommand of frequencies.
1445
1446 Sat Oct 30 09:16:29 WST 2004 John Darrington <john@darrington.wattle.id.au>
1447
1448         * oneway.q   Fixed up the behaviour when given missing values
1449
1450         * levene.c oneway.q Fixed a buglet with the levene statistic and
1451         incorporated the levene test into the oneway command.
1452
1453         * group.h  t-test.q  Moved the CMP_EQ and CMP_LE symbols out of 
1454         global scope, since they're only relevant to T-TEST
1455
1456 Fri Oct 29 17:39:03 WST 2004 John Darrington <john@darrington.wattle.id.au>
1457
1458         * group.c group.h group_proc.h levene.c oneway.q t-test.q
1459
1460         Made the t-test more consistent
1461         with the way it handles groups.  That is, it now uses a hash instead
1462         of an array of 2.  Also, made the levene.c file independent of the 
1463         implementation of the t-test.  So now levene should be fine for both
1464         t-test and anova.
1465
1466         * Added an oneway.q file for one way anova
1467
1468 Wed Jun  2 22:08:02 2004  Ben Pfaff  <blp@gnu.org>
1469
1470         * descript.c: (cmd_descriptives) Remove harmless but bogus test in
1471         STATISTICS parsing.
1472
1473 Mon May 31 20:45:24 2004  Ben Pfaff  <blp@gnu.org>
1474
1475         Fix memory leaks.
1476
1477         * data-list.c: (cmd_data_list) Free dls->delims on lossage.
1478         (data_list_trns_free) Free dls->delims.
1479
1480         * t-test.q: (tts_custom_pairs) Free vars.
1481         (ssbox_one_sample_init) Fix tab_vline() argument.
1482         (ssbox_independent_samples_init) Ditto.
1483         (trbox_paired_init) Ditto.
1484         (trbox_one_sample_init) Ditto.
1485
1486 Mon May 31 17:19:27 2004  Ben Pfaff  <blp@gnu.org>
1487
1488         Generalize casefiles to the extent that we can use them for
1489         sorting and other kinds of data transformations.  Change cases to
1490         be copy-on-write to improve memory efficiency in common cases.
1491         Every access to a member of a `struct ccase' was changed to be a
1492         call to a case_*() function, especially case_data(), case_num(),
1493         case_str(), or case_data_rw().  Many instances of a local variable
1494         named "case_num" were changed to "case_idx" as a consequence.
1495         Many `struct ccase *' were changed to actual `struct ccase'
1496         because of copying semantics of cases.  In several places there
1497         was a choice between updating debug code to work with the new ADTs
1498         or just deleting it because it was useless; I chose to delete it.
1499  
1500         * Makefile.am: (pspp_SOURCES) Add case.c, case.h.
1501
1502         * case.c: New file.
1503
1504         * case.h: New file.
1505
1506         * aggregate.c: (struct agr_proc) Change type of `sort' to
1507         sort_criteria *.  Add `break_vars', `break_var_cnt' members.
1508         Rename `vars' to `agr_vars', all references updated.  Change
1509         `agr_case' to type `struct ccase'.
1510         (cmd_aggregate) Deal with new members.  Use case_create(),
1511         sort_active_file_in_place(), sort_active_file_to_casefile().
1512         (agr_destroy) Deal with new members.
1513         (aggregate_single_case) Ditto.
1514         (dump_aggregate_info) Ditto.
1515         (initialize_aggregate_info) Ditto.
1516         (agr_to_active_file) Ditto.
1517         (presorted_agr_to_sysfile) Ditto.
1518         (sort_agr_to_sysfile) Removed.
1519
1520         * alloc.c: (out_of_memory) Make non-static.
1521
1522         * alloc.h: Prototype out_of_memory().
1523
1524         * casefile.c: Switched from a linked list in-memory representation
1525         to a two-level array-style representation.  The linked list was
1526         appropriate when we could stick a header onto cases, but that's no
1527         longer the case.  Also, the two-level array will allow for random
1528         in-memory access in case that's ever wanted.  Also added the
1529         concept of a `destructive casereader', one that destroys cases in
1530         the underlying casefile as they are read out.
1531         (macro CASES_PER_BLOCK) New macro.
1532         (struct casefile) New members `value_cnt', `case_list_size',
1533         `case_acct_size', `being_destroyed', `cases'.  Removed `head',
1534         `tail'.
1535         (struct casereader) Removed `cur'.  Added `destructive', `c'.
1536         (global var casefiles) Made static.
1537         (static var case_bytes) New var.
1538         (casefile_create) Takes a value count, not a case size in bytes,
1539         to conform to the case interface.  All callers updated.  Deal with
1540         new and removed members.
1541         (casefile_destroy) Deal with new and removed members.
1542         (casefile_sleep) New function.
1543         (casefile_get_case_size) Removed.
1544         (casefile_get_value_cnt) New function.
1545         (casefile_append) Rewritten to deal with new and removed members.
1546         (casefile_append_xfer) New function.
1547         (write_case_to_disk) Use case_serialize().
1548         (call_posix_fadvise) Removed because posix_fadvise64 segfaults.
1549         Couldn't figure out why.
1550         (casefile_to_disk) Don't call call_posix_fadvise.  Rewritten to
1551         deal with new and removed members.
1552         (merge) Removed.
1553         (merge_sort) Removed.
1554         (casefile_sort) Removed.
1555         (casefile_get_reader) Deal with new and removed members.
1556         (casefile_get_destructive_reader) New function.
1557         (reader_open_file) Make code more readable.  Create case for
1558         reader.
1559         (casereader_get_casefile) New function.
1560         (casereader_read) Deal with new and removed members.  Now returns
1561         a copy of the case, so that the caller is responsible for
1562         destroying the returned case.
1563         (casereader_read_xfer) New function.
1564         (casereader_destroy) Destroy reader's case.
1565         (test_casefile) Second arg is now a value count, all callers
1566         updated.  Now tests destructive readers too.
1567         (get_random_case) Deal with new case ADT.
1568         (write_random_case) Ditto.
1569         (read_and_verify_random_case) Ditto.
1570
1571         * crosstabs.q: Remove debug code.
1572
1573         * descript.q: (calc_descriptives) Deal with new case, casefile
1574         ADTs.
1575
1576         * dfm.c: (cmd_begin_data) There's no storage_source_class anymore.
1577
1578         * do-if.c: Remove unneeded header inclusion.
1579
1580         * expr-prs.c: Remove debug code.
1581
1582         * exprP.h: Remove debug code.
1583
1584         * flip.c: (flip_file) Use fseeko() if available.
1585
1586         * formats.c: Remove debug code.
1587
1588         * get.c: Remove debug code.
1589         (struct mtf_file) Change `input' from `union value *' to `struct
1590         ccase', all references updated.
1591
1592         * levene.c: (levene) Deal with new case, casefile ADTs.
1593
1594         * list.q: Remove debug code.
1595
1596         * loop.c: Remove debug code.
1597         
1598         * matrix-data.c: Remove debug code.
1599
1600         * means.q: Remove debug code.
1601
1602         * mis-val.c: Remove debug code.
1603
1604         * pfm-read.c: Remove debug code.
1605         (pfm_read_code) Change second arg from `union value *' to `struct
1606         ccase *', all references updated.
1607
1608         * recode.c: (string_to_long) Make first arg const.
1609         (convert_to_double) Ditto.
1610
1611         * repeat.c: Remove debug code.
1612
1613         * sample.c: Remove debug code.
1614
1615         * sfm-read.c: Remove debug code.
1616         (sfm_read_case) Change second arg from `union value *' to `struct
1617         ccase *'.
1618
1619         * sort.c: Redone in terms of casefiles.
1620         (enum sort_direction) Moved here from sort.h.
1621         (struct sort_criterion) New structure.
1622         (struct sort_criteria) New structure.
1623         (cmd_sort_cases) Rewritten.
1624         (prepare_to_sort_active_file) New function.
1625         (sort_active_file_in_place) New function.
1626         (sort_active_file_to_casefile) New function.
1627         (parse_sort) Renamed sort_parse_criteria(), rewritten & interface
1628         changed, all callers updated.
1629         (destroy_sort_cases_pgm) Renamed sort_destroy_criteria(),
1630         rewritten & interface changed, all callers updated.
1631         (sort_cases) Renamed sort_execute(), rewritten & interface
1632         changed, all callers updated.
1633         (struct internal_sort) Removed.
1634         (do_internal_sort) Rewritten, interface changed.
1635         (destroy_internal_sort) Removed.
1636         (compare_case_dblptrs) Use sort_criteria instead of sort_case_pgm.
1637         (struct initial_run) Removed; an initial run is now just a
1638         casefile.
1639         (compare_initial_runs) Rewritten.
1640         (struct external_sort) Changed almost completely.
1641         (do_external_sort) Rewritten, interface changed.
1642         (destroy_external_sort) Rewritten.
1643         [HAVE_MKDTEMP] (make_temp_dir) Removed.
1644         [!HAVE_MKDTEMP] (do_mkdir) Removed.
1645         [!HAVE_MKDTEMP] (make_temp_dir) Removed.
1646         (init_external_sort) Removed.
1647         (simulate_error) Removed.
1648         (rmdir_temp_dir) Removed.
1649         (get_temp_file_name) Removed.
1650         (open_temp_file) Removed.
1651         (close_temp_file) Removed.
1652         (remove_temp_file) Removed.
1653         (write_temp_file) Removed.
1654         (read_temp_file) Removed.
1655         (struct record_run) Change `record' from `struct case_lit *' to
1656         `struct ccase'.
1657         (struct initial_run_state) Remove `idx_to_fv', `free_list',
1658         `file_idx', `output_file'.  Add `run', casefile'.  Change
1659         `last_output' from `struct case_list *' to `struct ccase'.
1660         (write_initial_runs) Change interface, rewrite.
1661         (sort_sink_write) Renamed process_case(), changed interfaced,
1662         rewrote.
1663         (destroy_initial_run_state) Rewritten.
1664         (allocate_cases) Rewritten.
1665         (compare_record) Interface changed, rewritten.
1666         (start_run) Rewritten.
1667         (end_run) Rewritten.
1668         (output_record) Rewritten.
1669         (grab_case) Removed.
1670         (release_case) Removed.
1671         (struct merge_case) Change `cases' from double pointer to single
1672         pointer.
1673         (merge) Deal with new case and casefile ADTs.
1674         (struct run) Removed.
1675         (merge_once) Rewritten, interface changed.
1676         (fill_run_buffer) Removed.
1677         (sort_sink_make_source) Removed.
1678         (sort_sink_class) Removed.
1679         (struct sort_source_aux) Removed.
1680         (sort_source_read_helper) Removed.
1681         (sort_source_read) Removed.
1682         (read_sort_output) Removed.
1683         (read_internal_sort_output) Removed.
1684         (read_external_sort_output) Removed.
1685         (sort_source_destroy) Removed.
1686         (sort_source_class) Removed.
1687
1688         * sort.h: (struct sort_cases_pgm) Removed.
1689         (enum sort_direction) Moved to sort.c.
1690
1691         * t-test.q: (calculate) Deal with new case, casefile ADTs.
1692
1693         * tab.c: Remove debug code.
1694
1695         * var-labs.c: Remove debug code.
1696
1697         * var.h: (struct ccase) Removed.
1698         (struct case_list) Removed.
1699
1700         * vars-atr.c: (discard_variables) Use free_case_source().
1701
1702         * vars-prs.c: (parse_vs_variable) Make arg const.
1703         (parse_dict_variable) Ditto.
1704         (parse_variables) Make struct dictionary * arg const.
1705         (parse_var_set_vars) Make struct var_set * arg const.
1706         (struct var_set) Add const to some of the function pointers' args.
1707         (var_set_get_cnt) Make arg const.
1708         (var_set_get_var) Make first arg const.
1709         (var_set_lookup_var) Make first arg const.
1710         (dict_var_set_get_cnt) Make arg const.
1711         (dict_var_set_get_var) Make first arg const.
1712         (dict_var_set_lookup_var) Make first arg const.
1713         (var_set_create_from_dict) Make arg const.  Add cast to aux
1714         assignment.
1715         (struct array_var_set) Add const to var member.
1716         (array_var_set_get_cnt) Make arg const.
1717         (array_var_set_get_var) Make first arg const.
1718         (array_var_set_lookup_var) Make first arg const.
1719         (var_set_create_from_array) Make first arg const.  Insert cast.
1720
1721         * vfm.c: (struct write_case_data) Change trns_case, sink_case
1722         members from `struct ccase *' to `struct ccase'.
1723         (static var lag_queue) Change from double to single pointer.
1724         (procedure) Optimize trivial case.
1725         (internal_procedure) Deal with changed case, case_source ADTs.
1726         (create_trns_case) Changed interface, rewrote.
1727         (open_active_interface) Initialize modified lag queue.
1728         (write_case) Deal with changed case ADT.
1729         (lag_case) Deal with modified lag queue.
1730         (close_active_file) Destroy modified lag queue.
1731         Deal with changed case_source, case_sink ADTs.
1732         (destroy_storage_stream_info) Make null arg into no-op.
1733         (storage_sink_make_source) Set aux in created source.
1734         (storage_source_read) Deal with changed case, casefile ADTs.
1735         (storage_source_create) New function.
1736         (lagged_case) Rewrite.
1737         (free_case_source) New function.
1738         (free_case_sink) Rewrite.
1739         (struct split_aux_data) Changed prev_case from `struct ccase *' to
1740         `struct ccase'.
1741         (procedure_with_splits) Deal with changed prev_case.
1742         (procedure_with_splits_callback) Ditto.
1743         (multipass_split_aux_data) Changed prev_case from `struct ccase *' to
1744         `struct ccase'.
1745         (multipass_procedure_with_splits) Deal with changed prev_case.
1746         (multipass_split_callback) Ditto.
1747         
1748         
1749 Mon May 31 17:19:06 2004  Ben Pfaff  <blp@gnu.org>
1750
1751         The workspace idea didn't work out.
1752
1753         * Makefile.am: (pspp_SOURCES) Remove workspace.c, workspace.h.
1754         
1755         * workspace.c: Removed.
1756
1757         * workspace.h: Removed.
1758
1759 Sun May 30 18:35:19 2004  Ben Pfaff  <blp@gnu.org>
1760
1761         Fully implement arbitrary delimiters on DATA LIST, extending the
1762         half implementation that was already there.
1763
1764         * data-list.c: (struct data_list_pgm) Remove `delim', add
1765         `delims', `delim_cnt'.
1766         (cmd_data_list) Initialize new members.  Parse delimiters and
1767         clean up code a bit.
1768         (cut_field) Extract fields with arbitrary delimiters.  Also, fix
1769         handling of leading commas.
1770         (read_from_data_list_fixed) Expand tabs.  Adapt to new DFM
1771         interfaces.
1772         (read_from_data_list_free) Adapt to new DFM interfaces.
1773         (read_from_data_list_list) Ditto.
1774         (repeating_data_trns_proc) Ditto.
1775
1776         * dfm.c: Split up reader and writer into separate code, because
1777         they do different things.  Use struct string instead of explicit
1778         allocation code, for clarity.
1779         (enum dfm_reader_flags) New enum.
1780         (struct dfm_fhuser_ext) Removed.
1781         (struct dfm_reader_ext) New.
1782         (get_reader) New function, used by just about all the reader
1783         functions.
1784         (dfm_close) Removed.
1785         (close_reader) New function.
1786         (dfm_open_for_reading) Rewrite initialization of dfm_fhuser_ext.
1787         (dfm_open_for_writing) Ditto.
1788         (macro force_line_buffer_expansion) Removed.
1789         (count_tabs) Removed.
1790         (tabs_to_spaces) Removed.
1791         (read_record) Deal with new dfm_reader_ext.  Use struct string
1792         functions.  Don't convert tabs to spaces.
1793         (dfm_eof) New function.
1794         (dfm_get_record) Changed interface, rewrote.
1795         (dfm_expand_tabs) New function.
1796         (dfm_fwd_record) Renamed dfm_forward_record(), updated to new
1797         dfm_reader_ext, rewritten.
1798         (dfm_bkwd_record) Renamed dfm_reread_record(), updated to new
1799         dfm_reader_ext, rewritten.
1800         (dfm_set_record) Removed in favor of dfm_forward_columns().
1801         (dfm_forward_columns) New function.
1802         (dfm_get_cur_col) Renamed dfm_column_start, updated to new
1803         dfm_reader_ext, rewritten.
1804         (static var dfm_r_class) Use close_reader for the destructor.
1805         (struct dfm_writer_ext) New.
1806         (dfm_put_record) Updated to new dfm_writer_ext, rewritten.  Uses
1807         bounce buffer now instead of local allocation.
1808         (close_writer) New function.
1809         (static var dfm_writer_ext) Use close_writer for destructor.
1810         (cmd_begin_data) Adapt to new dfm_reader_ext.
1811
1812         * file-handle.q: Add support for per-file tab width.
1813         (struct private_file_handle) Add tab_width member.
1814         (q2c specifications) Add tabwidth subcommand.
1815         (cmd_file_handle) Put parsed tab width into private_file_handle.
1816         (create_file_handle) Set default tab width.
1817         (handle_get_tab_width) New function.
1818
1819         * file-type.c: (file_type_source_read) Adapt to new DFM interface.
1820
1821         * inpt-pgm.c: (reread_trns_proc) Ditto.
1822
1823         * matrix-data.c: (context) Ditto.
1824         (another_token) Ditto.
1825         (mget_token) Ditto.
1826         (force_eol) Ditto.
1827
1828 Sun May 30 18:33:59 2004  Ben Pfaff  <blp@gnu.org>
1829
1830         * casefile.c: (casefile_destroy) Fix memory leak by freeing
1831         cf->filename.
1832         (casereader_destroy) Don't close file descriptor -1.
1833
1834         * recode.c: (cmd_recode) Fix memory leak.
1835
1836         * set.q: (q2c specifications) Fix typo in user message.
1837
1838         * str.c: (st_bare_pad_len_copy) Change memcpy to memmove to avoid
1839         undefined behavior for overlapping arguments.
1840
1841 Sun May 30 18:31:48 2004  Ben Pfaff  <blp@gnu.org>
1842
1843         * casefile.c: valgrind doesn't implement posix_fadvise() yet, so
1844         don't call it when we're running under valgrind.
1845         (call_posix_fadvise) New function.
1846         (casefile_to_disk) Use call_posix_fadvise().
1847         (reader_open_file) Ditto.
1848         
1849 Sun May 30 18:20:12 2004  Ben Pfaff  <blp@gnu.org>
1850
1851         Update our string ADTs, struct string and struct len_string.  Get
1852         rid of pool support, which was largely unused.  Rename lots of
1853         functions to have more obvious or consistent names.
1854         
1855         * ascii.c: Get rid of ascii_pool.  It was only used for string
1856         allocations.
1857         (ascii_open_global) Don't create ascii_pool.
1858         (ascii_close_driver) Don't destroy ascii_pool.
1859         (ascii_postopen_driver) Don't use pool.
1860         (ascii_close_driver) Destroy strings manually.
1861
1862         * str.c: (ds_create) Remove pool argument, all references updated.
1863         (ds_init) Ditto.
1864         (ds_replace) Remove pool support, make more efficient when we
1865         don't need to reallocate.
1866         (ds_destroy) Remove pool support.
1867         (ds_rpad) New function.
1868         (ds_size) Renamed ds_capacity(), all references updated.
1869         (ds_value) Renamed ds_c_str(), all references updated.
1870         (ds_concat) Renamed ds_puts(), all references updated.
1871         (ds_concat_buffer) Renamed ds_concat(), all references updated.
1872         (ds_putchar) Renamed ds_putc(), all references updated.
1873         (ds_getline) Renamed ds_gets(), all references updated.
1874         (ls_create) Remove pool argument, all references updated.
1875         (ls_create_buffer) Ditto.
1876         (ls_destroy) Removed pool support.
1877         (ls_value) Renamed ls_c_str(), all references updated.
1878
1879         * str.h: (ls_length) [__GNUC__] Add inline version.
1880         (ls_c_str) [__GNUC__] Add inline version.
1881         (ls_end) [__GNUC__] Add inline version.
1882         (struct string) Remove pool member.  Rename `size' to `capacity',
1883         all references updated.
1884
1885         * tab.c: (text_format) Instead of using pool argument to
1886         ls_create_buffer(), call pool_register() on allocated data.
1887
1888 Mon Apr 26 22:40:07 2004  Ben Pfaff  <blp@gnu.org>
1889
1890         We're abusing the current ASCII driver by telling it to allocate a
1891         9999-line, 9999-character page in the tests.  This causes some
1892         systems to curl up and die because it allocates 20 MB of
1893         contiguous RAM.  This change alleviates at least part of the
1894         problem.  It is mostly a stop-gap until the new output system is
1895         ready.
1896         
1897         * ascii.c: (struct line) New structure.
1898         (struct ascii_driver_ext) Remove `page', `page_size', `line_len',
1899         `line_len_size', `n_output' members.  Add `lines', `lines_cap'.
1900         (ascii_preopen_driver) Initialize new members, not old ones.
1901         (ascii_close_driver) Destroy new members, not old ones.
1902         (ascii_open_page) Allocate new members, not old ones.
1903         (expand_line) Allocate room in line.
1904         (draw_line) Use new members.
1905         (ascii_line_horz) Ditto.
1906         (ascii_line_vert) Ditto.
1907         (ascii_line_intersection) Ditto.
1908         (text_draw) Ditto.
1909         (output_lines) Ditto.
1910         (ascii_close_page) Ditto.
1911
1912 Sun Apr 25 23:40:15 2004  Ben Pfaff  <blp@gnu.org>
1913
1914         * matrix.c: Dead code.  Removed.
1915
1916         * matrix.h: Dead code.  Removed.
1917
1918 Fri Apr 16 23:59:51 2004  Ben Pfaff  <blp@gnu.org>
1919
1920         Contrary to what I'd always understood, there is an efficient
1921         algorithm for deletion from a hash table populated via linear
1922         probing.  This change implements it.
1923         
1924         * hash.c: (hsh_rehash) Probe in increasing order.
1925         (hsh_probe) Ditto.
1926         (locate_matching_entry) Ditto.
1927         (hsh_delete) Use Knuth's Algorithm 6.4R for deletion.
1928
1929 Tue Apr 13 19:24:15 2004  Ben Pfaff  <blp@gnu.org>
1930
1931         * moments.c (calc_moments): Adjust calculation of kurtosis to
1932         avoid subtracting huge numbers from huge numbers, on Michael
1933         Kiefte's advice.
1934
1935 Sun Apr 11 14:22:12 2004  Ben Pfaff  <blp@gnu.org>
1936
1937         Rework moments routines for improved numerical stability based on
1938         Michael Kiefte's advice.  Any bugs or remaining numerical problems
1939         are still mine though.
1940
1941         There is now a struct moments1 for use with one-pass moments.  It
1942         uses a provisional means algorithm as an attempt to improve
1943         accuracy of higher moments.  The older struct moments now only
1944         handles two-pass moments.
1945         
1946         * aggregate.c: Use moments1 instead moments.
1947
1948         * descript.c: Revert previous change, which is no longer needed
1949         due to the moments revision.
1950
1951         * moments.c: (calc_moments) New function for calculating variance,
1952         skewness, kurtosis.
1953         (moments_pass_one) Only accumulate weights bigger than zero.
1954         (moments_calculate) Allow calculating the mean on pass one, others
1955         require pass two.  Implement in terms of calc_moments().
1956         (struct moments1) New structure.
1957         (init_moments1) New function.
1958         (moments1_clear) Ditto.
1959         (moments1_create) Ditto.
1960         (moments1_add) Ditto.
1961         (moments1_calculate) Ditto.
1962         (moments1_destroy) Ditto.
1963         (cmd_debug_moments) Deal with `struct moments' or `struct
1964         moments1' as requested by user.
1965
1966 Sun Apr 11 14:21:55 2004  Ben Pfaff  <blp@gnu.org>
1967
1968         * Makefile.am (pspp_SOURCES): Remove debug.c.
1969
1970         * debug.c: Removed.  It was empty anyway.
1971
1972 Fri Apr  9 20:04:49 2004  Ben Pfaff  <blp@gnu.org>
1973
1974         * descript.c (calc_descriptives): Fix assert failure when only
1975         MOMENT_MEAN is needed.
1976
1977 2004-04-09  Michael Kiefte  <mkiefte@dal.ca>
1978
1979         * descript.c: 
1980
1981         fixed problem with parsing in match_statistic() causing
1982         "DESCRIPTIVE STAT=MEAN." to barf.
1983
1984         "MEAN" is now default if "SORT" given without specification.
1985
1986         Fixed infinite loop with "DESCRIPT GIBBERISH=ALL."  Parsing is
1987         generally less forgiving of syntax errors: better to have it do
1988         nothing and type it in again then to not know what it actually did
1989         instead.  
1990
1991         z-score transformation now checks score for user-missing values
1992         and checks std_dev for SYSMIS.
1993
1994 2004-04-06  Michael Kiefte  <mkiefte@dal.ca>
1995
1996         * aggregate.c, crosstabs.q, descript.c, dictionary.c, frequencies.q, levene.c, t-test.q, var.h: 
1997         Changed dict_get_case_weight() to accept an additional int * flag
1998         to complain about system-missing, user-missing, zero, or negative
1999         weights and updated existing functions to pass int * to
2000         dict_get_case_weight().
2001
2002 2004-04-05  jmd  <jmd@gnu.org>
2003
2004         * main.c: Fixed configuration problems with gsl
2005
2006         * t-test.q: Fixed some problems encountered when compiling under Cygwin
2007
2008 2004-04-03  blp  <blp@gnu.org>
2009
2010         * lexer.c, ChangeLog:
2011         Fix infinite loop on comment at end of file, add test.
2012
2013 2004-04-03  jmd  <jmd@gnu.org>
2014
2015         * settings.h, var.h, ChangeLog, Makefile.am, cmdline.c, command.c, command.h, error.h, filename.c, frequencies.q, lexer.h, main.c, q2c.c, set.q:
2016         Fixed the calculation of percentiles and added --syntax and --algorithm options
2017
2018 Sat Apr  3 11:43:37 2004  Ben Pfaff  <blp@gnu.org>
2019
2020         * lexer.c: (lex_skip_comment) Handle end-of-file correctly (I
2021         hope).
2022
2023 Sat Apr  3 15:00:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
2024
2025         * frequencies.q:  Fixed the calculation of percentiles
2026
2027         * Makefile.am:  Added the --ansi flag and dealt with the
2028         consequences.  Added some entries to PSPP_sources so that
2029         make distcheck would pass
2030
2031         * cmdline.c:   Added the --syntax and --algorithm options
2032
2033         * q2c.c:  Added an implicit /ALGORITHM subcommand to everything.
2034
2035 Fri Apr  2 11:25:22 WAST 2004 John Darrington <john@darrington.wattle.id.au>
2036
2037         * t-test.q, levene.c, levene.h  Converted t-test (incl levene) to 
2038         use the new multipass_split_... mechanism.
2039
2040 Wed Mar 31 22:36:22 2004  Ben Pfaff  <blp@gnu.org>
2041
2042         * frequencies.q: (calc_stats) Use moments data structure and
2043         calc_seskew(), calc_sekurt() functions.
2044
2045         * set.q main.c settings.h Added support for --syntax and --algorithm 
2046         options
2047
2048 Tue Mar 30 22:04:19 2004  Ben Pfaff  <blp@gnu.org>
2049
2050         * vfm.c: Had to get last call to multipass_split_output() inside
2051         open_active_file()/close_active_file() pairing, so introduce new
2052         function.
2053         (internal_procedure) Move procedure() code here, except for calls
2054         to open_active_file() and close_active_file().
2055         (procedure) Wrap open_active_file() and close_active_file() around
2056         internal_procedure().
2057         (multipass_procedure_with_splits) Wrap open_active_file() and
2058         close_active_file() around internal_procedure().
2059
2060 Tue Mar 30 22:01:57 2004  Ben Pfaff  <blp@gnu.org>
2061
2062         * descript.c: (cmd_descriptives) Free `vars' to avoid memory leak.
2063
2064 Mon Mar 29 16:26:40 2004  Ben Pfaff  <blp@gnu.org>
2065
2066         * debug.c: Removed.  Moved cmd_debug_evaluate() into expr-evl.c.
2067
2068         * expr-evl.c: (cmd_debug_evaluate) Moved here from debug.c.
2069
2070 Mon Mar 29 16:03:08 2004  Ben Pfaff  <blp@gnu.org>
2071
2072         * algorithm.c: By default turn off some of the more expensive
2073         assertions.
2074         (expensive_assert) New macro which expands to assert if
2075         EXTRA_CHECKS is defined, to nothing otherwise.
2076         (unique) Use expensive_assert().
2077         (binary_search) Ditto.
2078         (push_heap) Ditto.
2079         (pop_heap) Ditto.
2080         (make_heap) Ditto.
2081         (sort_heap) Ditto.
2082
2083         * command.c: (conflicting_3char_prefixes) Words that are the same
2084         don't cause conflicts when they are abbreviated to the first three
2085         letters.
2086
2087         * expr-evl.c: (CONCAT_func) Fix memory leak by incrementing struct
2088         nonterm_node's n earlier.
2089         (generic_str_func) Ditto.
2090         
2091 Mon Mar 29 15:32:17 2004  Ben Pfaff  <blp@gnu.org>
2092
2093         Add support for multipass procedures.  Rewrite DESCRIPTIVES to
2094         test multipass support, take advantage of new moments
2095         calculation, and to not be such crappy code.  Get rid of q2c
2096         processing for DESCRIPTIVES.
2097
2098         * vfm.c: (struct multipass_split_aux_data) New structure.
2099         (multipass_procedure_with_splits) New function.
2100         (multipass_split_callback) New function.
2101         (multipass_split_output) New function.
2102         * descript.q: Removed.
2103
2104         * descript.c: New file.
2105
2106         * var.h: Removed descriptives enums.
2107         (struct descriptives_proc) Removed.
2108         (struct variable) Removed p.dsc.
2109
2110         * Makefile.am: (q_sources_c) Remove descript.c.
2111         (q_sources_q) Removed descript.q.
2112         
2113 Mon Mar 29 15:31:55 2004  Ben Pfaff  <blp@gnu.org>
2114
2115         New manager for keeping track of used workspace.
2116         
2117         * workspace.c: New file.
2118
2119         * workspace.h: New file.
2120
2121         * Makefile.am: (pspp_SOURCES) Add workspace.c, workspace.h.
2122
2123         * sort.c: (do_internal_sort) Use workspace_malloc().
2124         (destroy_internal_sort) Use workspace_free().
2125
2126 Mon Mar 29 15:31:08 2004  Ben Pfaff  <blp@gnu.org>
2127
2128         New `struct casefile' for managing sets of cases.
2129
2130         * casefile.c: New file.
2131
2132         * casefile.h: New file.
2133
2134         * command.def: Add DEBUG CASEFILE command.
2135
2136         * Makefile.am: (pspp_SOURCES) Add casefile.c, casefile.h.
2137
2138         * sort.c: (sort_cases) Move logic for sending storage file to disk
2139         into do_external_sort().
2140         (struct internal_sort) Use an array of ccase pointers instead of a
2141         case_list.
2142         (do_internal_sort) Rewrite to handle casefiles.
2143         (compare_case_list) Removed.
2144         (compare_cases) New function.
2145         (compare_case_dblptrs) New function.
2146         (read_internal_sort_output) Deal with new struct internal_sort.
2147
2148         * vfm.c: (static var workspace_overflow) Removed.
2149         (struct storage_stream_info) Removed all the members.  Added
2150         struct casefile * member.
2151         (storage_sink_open) Use casefile.
2152         (open_storage_file) Removed.
2153         (write_storage_file) Removed.
2154         (storage_to_disk) Removed.
2155         (destroy_storage_stream_info) Use casefile.
2156         (storage_sink_write) Use casefile.
2157         (storage_sink_make_source) Use casefile.
2158         (storage_source_count) Use casefile.
2159         (storage_source_read) Use casefile.
2160         (storage_source_on_disk) Removed.
2161         (storage_source_get_cases) Removed.
2162         (storage_source_set_cases) Removed.
2163         (storage_source_get_casefile) New function.
2164         
2165 Mon Mar 29 15:30:09 2004  Ben Pfaff  <blp@gnu.org>
2166
2167         New `struct moments' for calculating moments.
2168
2169         * stats.c: Removed.
2170
2171         * stats.h: Removed.
2172
2173         * moments.c: New file.
2174
2175         * moments.h: New file.
2176
2177         * command.def: Add DEBUG MOMENTS command.
2178
2179         * Makefile.am: (pspp_SOURCES) Add moments.c, moments.h.  Remove
2180         stats.c, stats.h.
2181
2182         * aggregate.c: Modify AGGREGATE to use the new moments
2183         calculation, even if not in such a great way.
2184         (struct agr_var) Add `moments' member.
2185         (parse_aggregate_functions) Set `moments' member to null.
2186         (agr_destroy) Destroy `moments' member.
2187         (accumulate_aggregate_info) Use `moments' for standard deviation.
2188         (dump_aggregate_info) Ditto.
2189         (initialize_aggregate_info) Create or clear `moments'.
2190
2191         * misc.h: Add pow2(), pow3(), pow4() functions in place of sqr(),
2192         cube(), pow4() that were in stats.h.  All references updated.
2193
2194         * crosstabs.q: stats.h had chi-square significance functions.  Use
2195         GSL instead.
2196         (display_chisq) Use gsl_cdf_chisq_Q() instead of chisq_sig().
2197
2198         * expr-evl.c: (expr_evaluate) Use moments_of_values() for
2199         OP_CFVAR, OP_MEAN, OP_SD, OP_VARIANCE.
2200                 
2201 Fri Mar 26 14:21:23 2004  Ben Pfaff  <blp@gnu.org>
2202
2203         * dictionary.c: (dict_compact_values) Compacted values need to
2204         start off from 0.
2205
2206 Fri Mar 26 00:54:57 2004  Ben Pfaff  <blp@gnu.org>
2207
2208         * var-labs.c: (cmd_variable_labels) For compatibility, don't allow
2209         `/' at start.  Check return value of parse_variables() for error
2210         return.
2211
2212 Fri Mar 26 00:19:27 2004  Ben Pfaff  <blp@gnu.org>
2213
2214         Revamp expressions: make the code a little nicer, and fix bugs
2215         found in testing.
2216         
2217         * expr-evl.c: (expr_evaluate) Make expression argument const.
2218         Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
2219         OP_POW is missing for arg 2 <= 0.  OP_LOG is natural log, not
2220         base-10 log.  Fix OP_ANY, OP_ANY_STRING, OP_RANGE, OP_RANGE_STRING
2221         off-by-ones.  Add OP_MAX_STRING, OP_MIN_STRING.  Fix OP_TIME_HMS,
2222         OP_DATE_WKYR boundary conditions.  Add OP_CTIME_DAYS,
2223         OP_CTIME_HOURS, OP_CTIME_MINUTES, OP_CTIME_DAYS, OP_CTIME_SECONDS.
2224         Support OP_INDEX_2, OP_INDEX_3, OP_RINDEX_2, OP_RINDEX_3 instead
2225         of OP_INDEX, OP_INDEX_OPT, OP_RINDEX, OP_RINDEX_OPT.  Merge
2226         OP_LPAD_OPT into OP_LPAD, OP_RPAD_OPT into OP_RPAD, OP_LTRIM_OPT
2227         into OP_LTRIM, OP_RTRIM_OPT into OP_RTRIM, OP_NUMBER_OPT into
2228         OP_NUMBER.  Fix OP_RTRIM fragility.  Support OP_SUBSTR_2,
2229         OP_SUBSTR_3 instead of OP_SUBSTR, OP_SUBSTR_OPT.  Remove OP_INV.
2230         Simplify OP_SYSMIS.  Remove OP_STR_MIS.
2231
2232         * expr-opt.c: (optimize_expression) Rewrite.
2233         (macro n0) Removed.
2234         (macro n1) Removed.
2235         (macro n2) Removed.
2236         (macro s0) Removed.
2237         (macro s0l) Removed.
2238         (macro s1) Removed.
2239         (macro s1l) Removed.
2240         (macro s2) Removed.
2241         (macro s2l) Removed.
2242         (macro s) Removed.
2243         (macro sl) Removed.
2244         (eq_num_con) New function.
2245         (optimize_tree) New function.
2246         (macro rnc) Removed.
2247         (macro frnc) Removed.
2248         (str_search) Add const to string params.
2249         (str_rsearch) Ditto.
2250         (evaluate_tree_no_missing) Renamed from evaluate_tree.  Add num[],
2251         str[], str_len[] locals to substitute for most of removed macros.
2252         Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
2253         Removed support for missing values because we're never called with
2254         missing values.  Use set_number() or set_number_errno() instead of
2255         rnc or frnc.  Removed any stuff that caused trouble in testing.
2256         We can re-add it later if it really slows anything.  Fix some
2257         random problems.
2258         (evaluate_tree_with_missing) Not yet supported.  To be added later
2259         if it's important.
2260         (repl_num_con) Removed.
2261         (collapse_node) New function.
2262         (force_repl_num_con) Removed.
2263         (set_number) New function.
2264         (set_number_errno) New function.
2265         (repl_str_con) Removed.
2266         (set_string) New function.
2267         (yrmoda) Tighten boundary conditions.  Adopt 2030 cut-off for
2268         2-digit years.
2269         (dump_node) No special case for OP_AND, OP_OR.
2270
2271         * expr-prs.c: (expr_prs) Honor EXPR_NO_OPTIMIZE bit.  Rewrite.
2272         (expr_get_type) New function.
2273         (type_check) Rewrite.
2274         (type_coercion) New function.
2275         (struct operator) New structure.
2276         (match_operator New function.
2277         (parse_binary_operators) New function.
2278         (parse_inverting_unary_operator) New function.
2279         (parse_or) Rewritten.
2280         (parse_and) Rewritten.
2281         (parse_not) Rewritten.
2282         (parse_rel) Rewritten.
2283         (parse_add) Rewritten.
2284         (parse_mul) Rewritten.
2285         (parse_neg) Rewritten.
2286         (parse_exp) Rewritten.
2287         (parse_sysvar) Add $TRUE, $FALSE system variables.
2288         Get $LENGTH, $WIDTH from get_viewlength(), get_viewwidth().
2289         (parse_primary) Use allocate_var_node(), allocate_num_con(),
2290         allocate_str_con().
2291         (struct function) Remove desc, change `func' prototype.
2292         (unary_func) Remove special cases.
2293         (MISSING_func) Reduce to unary_func() that just returns a boolean.
2294         (SYSMIS_func) Handle SYSMIS((x)) like SYSMIS(x).
2295         (VALUE_func) Use allocate_var_node().
2296         (nary_num_func) Allow MIN and MAX for strings.
2297         Use allocate_var_node().  Properly clean up.
2298         Fix return type.
2299         (generic_str_func) Use local table instead of removed `desc'
2300         member.  Mostly rewrite.
2301         (get_num_args) Revise error message.
2302         (parse_function) Return EXPR_ERROR, not 0 on error.
2303         (macro op) Removed.
2304         (macro varies) Removed.
2305         (ops[]) Use expr.def.
2306         (free_node) Do nothing if node is null.
2307         (allocate_num_con) New function.
2308         (allocate_str_con) New function.
2309         (allocate_var_node) New function.
2310         (allocate_binary_nonterminal) New function.
2311         (append_nonterminal_arg) Removed.
2312         (static var func_tab[]) Revised.
2313         (expr_debug_print_postfix) Make parameter const.
2314         Use printf() instead of debug_printf().
2315
2316         * expr.def: New file.
2317         
2318         * expr.h: Change PXP_* to EXPR_*, all references updated.  Also
2319         use named enum instead of unnamed, all references updated.  Add
2320         EXPR_ANY, EXPR_NO_OPTIMIZE.
2321
2322         * exprP.h: Remove EX_*.  Add DEFINE_OPERATOR.  Use expr.def
2323         instead of defining OP_* directly.
2324         (macro IS_TERMINAL) New macro.
2325         (macro IS_NONTERMINAL) New macro.
2326         (enum OP_NO_FLAGS) New.
2327         
2328 Fri Mar 26 00:18:01 2004  Ben Pfaff  <blp@gnu.org>
2329
2330         * error.c: (err_assert_fail) msg variable needs to be non-const.
2331
2332 Fri Mar 26 00:17:24 2004  Ben Pfaff  <blp@gnu.org>
2333
2334         * debug.c: (cmd_debug_evaluate) Rewrite.
2335
2336 Fri Mar 26 00:15:13 2004  Ben Pfaff  <blp@gnu.org>
2337
2338         Fix some CROSSTABS bit rot stupidity.
2339
2340         * crosstabs.q: Reorder the CELLS subcommands for compatibility.
2341         (internal_cmd_crosstabs) Initializes cells[] correctly.
2342         (float_M_suffix) Rename format_cell_entry(), change prototype,
2343         rewrite.
2344         (display_crosstabulation) Fix cell formatting.
2345
2346 Fri Mar 26 00:14:09 2004  Ben Pfaff  <blp@gnu.org>
2347
2348         Make lex_rest_of_line(), lex_entire_end() not discard lines.  Have
2349         to call lex_discard_line() to do that.
2350
2351         * command.c: (run_command) Call lex_discard_line() after
2352         lex_rest_of_line().
2353
2354         * lexer.c: (lex_entire_end) Change behavior.
2355         (lex_rest_of_line) Change behavior.  Return const char *.
2356         (lex_discard_line) Don't clear getl_buf, don't emit message.
2357
2358         * main.c: (handle_error) Emit message here.
2359
2360         * repeat.c: (internal_cmd_do_repeat) Use lex_discard_line()
2361         instead of lex_entire_line().
2362
2363         * str.c: (mm_find_reverse) Make length params size_t.  Rewrite.
2364
2365         * title.c: (get_title) Call lex_discard_line() after
2366         lex_rest_of_line().
2367         (cmd_file_label) Ditto.
2368         (cmd_document) Deal with const char * return value.
2369
2370 Fri Mar 26 00:10:16 2004  Ben Pfaff  <blp@gnu.org>
2371
2372         Removed REMARK command.
2373
2374         * command.c: (extract_prefix) Removed.
2375         (output_line) Removed.
2376         (cmd_remark) Removed.
2377
2378         * command.def: Remove REMARK.
2379
2380 Fri Mar 26 00:08:38 2004  Ben Pfaff  <blp@gnu.org>
2381
2382         Added abort() after lots of assert(0) invocations to avoid some
2383         compiler warnings.  We really need a NOT_REACHED macro.
2384
2385 Tue Mar 23 08:00:42 WAST 2004 John Darrington <john@darrington.wattle.id.au>
2386
2387         * sort.c: Added missing call to temp_file_close.  Changed error 
2388         messages to warnings.
2389
2390         * set.q: Improved setting of set_view{length,width} to be more tolerant
2391         of buggy OSes.
2392
2393 Sun Mar 21 10:11:14 WST 2004 John Darrington <john@darrington.wattle.id.au>
2394
2395         * val-labs.c: Fixed a bug where PSPP would crash, if VALUE LABELS was
2396         used with incorrect syntax.
2397
2398         * error.c, error.h et al:  Overridden definition of assert for a
2399         custom one.
2400
2401         * test-q.c: Fixed a buglet where it would crash if no /VARIABLES
2402         subcommand was given when it ought to have been.
2403
2404 Sat Mar 20 22:19:08 2004  Ben Pfaff  <blp@gnu.org>
2405
2406         * tab.c: (tab_vline) Fix assertions to respect row_ofs and
2407         col_ofs.
2408         (tab_hline) Ditto.
2409         (tab_box) Ditto.
2410         (tab_joint_text) Ditto.
2411
2412 Sat Mar 20 17:57:23 2004  Ben Pfaff  <blp@gnu.org>
2413
2414         * levene.c: Add #include.
2415
2416         * set.q: (set_viewport) Add `int' argument to make its prototype
2417         correct for signal().
2418
2419 Sat Mar 20 15:35:17 2004  Ben Pfaff  <blp@gnu.org>
2420
2421         * expr-evl.c: (expr_evaluate) Assert that `c' is nonzero before
2422         using it.
2423
2424 Sat Mar 20 15:18:16 2004  Ben Pfaff  <blp@gnu.org>
2425
2426         Changed DFM from open-at-first-access to explicit-open.  Before,
2427         calling dfm_get_record() or dfm_put_record() would automatically
2428         open the file.  Now, you have to call dfm_open_for_reading() or
2429         dfm_open_for_writing() explicitly.  This makes it possible to
2430         check permissions, file existence, etc. earlier.
2431
2432         Also made struct file_handle more opaque, and clean up in general.
2433
2434         * data-list.c: (cmd_data_list) Open handle for reading.
2435
2436         * dfm.c: (struct dfm_fhuser_ext) Add `where', `saw_begin_data'
2437         members.
2438         (open_file_r) Renamed dfm_open_for_reading(), rewrote.
2439         (open_file_w) Renamed dfm_open_for_writing(), rewrote.
2440         (open_inline_file) Removed.
2441         (read_record) For inline_file, if we haven't seen BEGIN DATA, read
2442         it.  Deal with line_number in extension record instead of file
2443         handle.
2444         (dfm_get_record) Rewrote.
2445         (dfm_put_record) Rewrote.
2446         (dfm_push) Assert file is open and one of ours.  Deal with
2447         line_number in extension record instead of file handle.
2448         (dfm_pop) Assert file is open and one of ours.  Deal with
2449         line_number in extension record instead of file handle.
2450         (cmd_begin_data) Use dfm_open_for_reading().  Mark that we saw
2451         BEGIN DATA.     
2452
2453         * file-handle.h: (enum constants RH_RF_*) Removed.
2454         (enum constants FH_MD_*) Removed.
2455         (struct file_handle) Removed `name', `norm_fn', `fn', `where',
2456         `recform', `lrecl', `mode' members.  Public references to
2457         `recform' changed to use handle_get_mode(), references to `lrecl'
2458         changed to use handle_get_record_width().  Added `private' member.
2459         (enum file_handle_mode) New.
2460
2461         * file-handle.q: (struct private_file_handle) New structure.
2462         (struct file_handle_list) New structure.
2463         (static var files) New.
2464         (static var file_handles) Removed.
2465         (init_file_handle) Removed.
2466         (create_file_handle) Removed.
2467         (get_handle_with_name) New function.
2468         (get_handle_for_filename) New function.
2469         (cmd_file_handle) Rewritten.
2470         (hash_file_handle) Removed.
2471         (cmp_file_handle) Removed.
2472         (fh_init_files) Rewritten.
2473         (fh_parse_file_handle) Rewritten.  Allows identifiers as
2474         filenames.
2475         (fh_get_handle_by_name) Renamed handle_get_name(), all references
2476         updated.  Rewritten.
2477         (fh_get_handle_by_filename) Renamed handle_get_filename(), all
2478         references updated.  Rewritten.
2479         (fh_record_width) Renamed handle_get_record_width(), all
2480         references updated.  Rewritten.
2481         (handle_get_mode) New function.
2482
2483         * file-type.c: (cmd_file_type) Open handle for reading.
2484
2485         * filename.c: [unix] (struct file_identity) New structure.
2486         [unix] (fn_get_identity) New function.
2487         [unix] (fn_free_identity) New function.
2488         [unix] (fn_compare_file_identities) New function.
2489         [!unix] (struct file_identity) New structure.
2490         [!unix] (fn_get_identity) New function.
2491         [!unix] (fn_free_identity) New function.
2492         [!unix] (fn_compare_file_identities) New function.
2493
2494         * lexer.c: (static var put) Renamed put_token, all references
2495         updated.
2496         (static var put_tokstr) New.
2497         (static var put_tokval) New.
2498         (lex_init) Initialize put_tokstr().
2499         (restore_token) New function.
2500         (save_token) New function.
2501         (lex_get) Use restore_token().
2502         (lex_put_back) Use save_token().
2503         (lex_put_back_id) New function.
2504         (lex_put_forward) Removed.
2505         (lex_preprocess_line) Set put_token instead of using
2506         lex_put_forward().
2507         (lex_negative_to_dash) Use save_token(), set put_token directly.
2508         (dump_token) Use stderr instead of stdout.
2509
2510         * main.c: (main) Remove call to cmd_init().
2511         
2512         * matrix-data.c: (cmd_matrix_data) Open file for reading.
2513
2514         * pfm-read.c: Use handle_get_filename() instead of trying to use
2515         h->fn directly, all over.
2516
2517         * pfm-write.c: Ditto.
2518
2519         * print.c: (internal_cmd_print) Open handle for writing.
2520         (dump_table) Use handle_get_filename().
2521         (print_trns_proc) Use handle_get_mode().
2522         (cmd_print_space) Use fh_parse_file_handle().
2523         Open handle for writing.
2524         [0] (debug_print) Removed.
2525
2526         * sfm-read.c: Use handle_get_filename() instead of trying to use
2527         h->fn directly, all over.
2528
2529         * sfm-write.c: Ditto.
2530
2531 Sat Mar 20 14:35:48 2004  Ben Pfaff  <blp@gnu.org>
2532
2533         Fix memory leaks.
2534         
2535         * autorecode.c: (arc_free) Free arc->src_values.
2536
2537         * error.c: (msg) Free buf.
2538
2539         * val-labs.c: (do_value_labels) Always free vars.
2540
2541         * vfm.c: (close_active_file) If sink has no make_source then call
2542         its destroy function.
2543
2544 Sat Mar 20 14:00:24 2004  Ben Pfaff  <blp@gnu.org>
2545
2546         Fixed cmd_parse() so that it always skips past a full command
2547         name.  A few special commands for which this would be bad get
2548         special treatment.  This lets us drop code for skipping past the
2549         end of a command name in most cmd_*() functions.  It's not worth
2550         listing all the commands affected.
2551
2552         * command.c: (struct command) Remove `cmd' member, replace by
2553         `name' member, all references updated.  Remove `word', `next',
2554         `skip_entire_name' members.
2555         (macro DEFCMD) Deal with revised `struct command'.
2556         (macro UNIMPL) Ditto.
2557         (macro SPCCMD) New macro for commands whose last word shouldn't be
2558         skipped.
2559         (static array cmd_table[]) Make const, rename `commands', remove
2560         sentinel element.
2561         (macro COMMAND_CNT) New macro.
2562         (split_words) Removed.
2563         (cmd_init) Removed.
2564         (FILE_TYPE_okay) Make parameter const.
2565         (cmd_parse) Improve error messages.
2566         (match_strings) New function.
2567         (next_word) New function.
2568         (enum command_match) New enum.
2569         (conflicting_3char_prefixes) New function.
2570         (conflicting_3char_prefix_command) New function.
2571         (cmd_match_words) New function.
2572         (count_matching_commands) New function.
2573         (get_command_name) New function.
2574         (free_words) New function.
2575         (unknown_command_error) New function.
2576         (figure_out_command) Renamed parse_command_name(), rewritten.
2577
2578         * command.def: Removed @ command.  Marked BEGIN DATA, DOCUMENT,
2579         FILE LABEL, REMARK, SUBTITLE, TITLE as special.  Renamed EVALUATE
2580         to DEBUG EVALUATE.  Added N alias for N OF CASES, SORT alias for
2581         SORT CASES.
2582
2583         * command.h: (macro SPCCMD) New.
2584
2585         * include.c: (cmd_include_at) Removed.
2586         (cmd_include) Allow identifier to be used as filename.
2587
2588         * inpt-pgm.c: (cmd_reread) Use fh_parse_file_handle().
2589
2590         * t-test.q: (cmd_t_test) Command name is now parsed for us.
2591         
2592
2593 Sat Mar 20 13:56:00 2004  Ben Pfaff  <blp@gnu.org>
2594
2595         Start work on better test framework.
2596         
2597         * Makefile.am: (pspp_sources) Add debug.c.
2598         
2599         * debug.c: New file.
2600
2601         * compute.c: (cmd_evaluate) Moved to debug.c, renamed
2602         cmd_debug_evaluate().
2603
2604         * expr-prs.c: (expr_parse) Remove PXP_DUMP support.
2605
2606         * expr.h: (enum constant PXP_DUMP) Removed.
2607
2608 Sat Mar 20 00:05:42 WST 2004 John Darrington <john@darrington.wattle.id.au>
2609
2610         * set.q:  Implemented the SHOW command, and synced it to the existing 
2611         SET cmd.
2612
2613         Added a handler for SIGWINCH so that viewlength and viewwidth follow
2614         changes as the window size is changed.
2615
2616         Added fallback to set viewlength and viewwidth from LINES and COLUMS
2617         environment variables if other methods are not available.
2618
2619         glob.c: Removed a lot of global variables from glob.c and encapsulated 
2620         them in set.q
2621
2622         random.c: Tidied up the way the random seed is set.
2623
2624         str.c: Added a ds_vprintf function.
2625
2626         error.c: Extended dump_message so that messages are always broken at
2627         '\n' characters.
2628         
2629 Thu Mar 18 11:07:14 2004  Ben Pfaff  <blp@gnu.org>
2630
2631         * pfm-write.c: (bufwrite) Write out the correct element for string
2632         variables.  From Andreas Streichardt <streichardt@globalpark.de>.
2633
2634 Mon Mar 15 20:48:03 2004  Ben Pfaff  <blp@gnu.org>
2635
2636         Get rid of static and global (!) vars in matrix-data.c.
2637
2638         * matrix-data.c: (static var nr_data) Removed.
2639         (static var nr_factor_values) Removed.
2640         (static var max_cell_index) Removed.
2641         (static var split_values) Removed.
2642         (struct nr_aux_data) New structure.
2643         (read_matrices_without_rowtype) Use a local struct nr_aux_data in
2644         place of static vars, pass to create_case_source() and procedure()
2645         as aux data.
2646         (nr_read_data_lines) Use struct nr_aux_data * parameter instead of
2647         struct matrix_data_pgm *.
2648         (nr_read_splits) Ditto.
2649         (nr_read_factors) Ditto.
2650         (nr_output_data) Ditto.
2651         (static var wr_content) Removed.
2652         (global var wr_data) Removed.
2653         (global var wr_current) Removed.
2654         (struct wr_aux_data) New structure.
2655         (read_matrices_with_rowtype) Use a local struct wr_aux_data in
2656         place of static vars, pass to create_case_source() and procedure()
2657         as aux data.
2658         (matrix_data_read_with_rowtype) Use struct wr_aux_data * parameter
2659         instead of matrix_data_pgm *.
2660         (wr_read_splits) Ditto.
2661         (wr_output_data) Ditto.
2662         (wr_read_rowtype) Ditto.
2663         (wr_read_factors) Ditto.
2664         (wr_read_indeps) Ditto.
2665         
2666 Mon Mar 15 20:07:29 2004  Ben Pfaff  <blp@gnu.org>
2667
2668         Get rid of static vars in autorecode.c.
2669
2670         * autorecode.c: (struct autorecode_trns) Rename `arc' to `specs',
2671         `n_arc' to `spec_cnt'.  All references updated.
2672         (static var v_src) Removed.
2673         (static var v_dest) Removed.
2674         (static var h_trns) Removed.
2675         (static var nv_src) Removed.
2676         (static var descend) Removed.
2677         (static var print) Removed.
2678         (enum direction) New enum.
2679         (struct autorecode_pgm) New structure.
2680         (cmd_autorecode) Use struct autorecode_pgm instead of static vars.
2681         Move n_dest local var into struct autorecode_pgm for ease of
2682         clean-up.  Use arc_free().
2683         (arc_free) New function.
2684         (recode) Modify to take struct autorecode_pgm * parameter instead
2685         of using statics.  Let the caller clean up.
2686         (autorecode_proc_func) Use struct autorecode_pgm * auxiliary data
2687         instead of statics.  Rearrange code a little.
2688
2689 Mon Mar 15 00:25:02 2004  Ben Pfaff  <blp@gnu.org>
2690
2691         Get rid of static, global vars in recode.c.  Remove debug code.
2692
2693         * recode.c: (static var head) Removed.
2694         (global var v) Removed.
2695         (global var nv) Removed.
2696         (cmd_recode) New local variables head, v, nv.  Initialize and free
2697         v.  Don't call debug_print().
2698         [DEBUGGING] (dump_dest) Removed.
2699         [DEBUGGING] (debug_print) Removed.
2700
2701 Mon Mar 15 00:14:49 2004  Ben Pfaff  <blp@gnu.org>
2702
2703         Get rid of static vars in expr-opt.c.
2704
2705         * expr-opt.c: (static var e) Removed.
2706         (static var nop) Removed.
2707         (static var mop) Removed.
2708         (static var ndbl) Removed.
2709         (static var mdbl) Removed.
2710         (static var nstr) Removed.
2711         (static var mstr) Removed.
2712         (static var nvars) Removed.
2713         (static var mvars) Removed.
2714         (struct expr_dump_state) New structure.
2715         (dump_expression) Use new struct expr_dump_state instead of static
2716         vars and pass to functions we call.
2717         (dump_node) Use struct expr_dump_state * parameter.
2718         (emit) Ditto.
2719         (emit_num_con) Ditto.
2720         (emit_str_con) Ditto.
2721         (emit_var) Ditto.
2722         
2723 Mon Mar 15 00:03:51 2004  Ben Pfaff  <blp@gnu.org>
2724
2725         Get rid of static var in COUNT.
2726
2727         * count.c: (static var head) Move into cmd_count().
2728         (cmd_count) [DEBUGGING] Don't call debug_print.
2729         [DEBUGGING] (debug_print) Removed.
2730
2731 Sun Mar 14 23:56:09 2004  Ben Pfaff  <blp@gnu.org>
2732
2733         Get rid of static vars in VALUE LABELS, ADD VALUE LABELS.
2734
2735         * val-labs.c: (static var v) Removed.
2736         (static var nv) Removed.
2737         [DEBUGGING] (debug_print) Removed.
2738         (verify_val_labs) Add struct variable **, int parameters.
2739         (get_label) Ditto.  Improve error messages, streamline.
2740         (erase_labels) New function for erasing value labels, taking over
2741         part of verify_val_labs()'s function.
2742         (init) Removed.
2743         (done) Removed.
2744         (cmd_value_labels) No need to call init() or done() anymore.
2745         (cmd_add_value_labels) Ditto.
2746         (do_value_labels) Add vars, var_cnt local variables.  Clean up
2747         after them internally.  Call erase_labels() if we should.  Don't
2748         call debug_print().
2749
2750 Sun Mar 14 23:33:53 2004  Ben Pfaff  <blp@gnu.org>
2751
2752         Get rid of static vars in MATCH FILES.
2753         
2754         * get.c: (static var mtf_head) Removed.
2755         (static var mtf_tail) Removed.
2756         (static var mtf_by) Removed.
2757         (static var mtf_n_by) Removed.
2758         (static var mtf_master) Removed.
2759         (static var mtf_seq_num) Removed.
2760         (static var mtf_seq_nums) Removed.
2761         (static var mtf_sink) Removed.
2762         (static var mtf_case) Removed.
2763         (struct mtf_proc) New structure.
2764         (cmd_match_files) Use struct mtf_proc instead of static vars.
2765         (mtf_processing_finish) Ditto.
2766         (mtf_free) Ditto.
2767         (mtf_delete_file_in_place) Ditto.
2768         (mtf_read_nonactive_records) Ditto.
2769         (mtf_compare_BY_values) Ditto.
2770         (mtf_processing) Ditto.
2771         (mtf_merge_dictionary) Ditto.
2772
2773 Sun Mar 14 22:48:12 2004  Ben Pfaff  <blp@gnu.org>
2774
2775         * command.def: Add CASESTOVARS, VARSTOCASES unimplemented commands.
2776
2777         * dictionary.c: (dict_rename_var) Add assertion.
2778         (dict_contains_var) Check by index instead of name.
2779
2780 Sun Mar 14 22:01:02 2004  Ben Pfaff  <blp@gnu.org>
2781
2782         Get rid of compaction_necessary, compaction_nval, compaction_case.
2783         Redo VFM interface.  Replace disk_sink and memory_sink by
2784         storage_sink, disk_source and memory_source by storage_source.
2785
2786         * vfm.h: (struct case_sink) Add `dict', `idx_to_fv', `value_cnt'
2787         members.
2788
2789         * vfm.c: 
2790         (struct write_case_data) Remove `begin_func', `end_func',
2791         `func_aux' members.  Add `aux', `trns_case', `sink_case',
2792         `cases_written', `cases_analyzed' members.
2793         (global var compaction_necessary) Make static.
2794         (global var compaction_nval) Removed.
2795         (global var compaction_case) Removed.
2796         (static var case_count) Removed.
2797         (struct procedure_aux_data) Removed.
2798         (struct split_aux_data) Removed.
2799         (procedure) Remove begin_func, end_func parameters.  Rewrite.
2800         (static var not_canceled) Removed.
2801         (process_active_file) Removed.
2802         (process_active_file_write_case) Removed.
2803         (process_active_file_output_case) Removed.
2804         (prepare_for_writing) Moved into open_active_file().
2805         (arrange_compaction) Ditto.
2806         (setup_lag) Ditto.
2807         (open_active_file) Rewrote.
2808         (write_case) New function.
2809         [DEBUGGING] (index_to_varname) Removed.
2810         (execute_transformations) New function.
2811         (exclude_this_case) Renamed filter_case(), changed interface.
2812         (clear_case) Added struct ccase * parameter to interface.
2813         (close_active_file) Added struct write_case_data * parameter,
2814         rewrote.
2815         (disk_sink_create) Removed.
2816         (disk_sink_destroy) Removed.
2817         (disk_sink_make_source) Removed.
2818         (disk_sink_write) Removed.
2819         (disk_source_count) Removed.
2820         (disk_source_destroy) Removed.
2821         (disk_source_read) Removed.
2822         (global var disk_sink_class) Removed.
2823         (global var disk_source_class) Removed.
2824         (global var memory_sink_class) Removed.
2825         (global var memory_source_class) Removed.
2826         (memory_sink_create) Removed.
2827         (memory_sink_destroy) Removed.
2828         (memory_sink_make_source) Removed.
2829         (memory_sink_write) Removed.
2830         (memory_source_count) Removed.
2831         (memory_source_destroy) Removed.
2832         (memory_source_get_cases) Removed.
2833         (memory_source_read) Removed.
2834         (memory_source_set_cases) Removed.
2835         (struct disk_stream_info) Removed.
2836         (struct memory_sink_info) Removed.
2837         (struct memory_source_info) Removed.
2838         (write_active_file_to_disk) Removed.
2839         (destroy_storage_stream_info) New function.
2840         (global var null_sink_class) New var.
2841         (global var storage_sink_class) New var.
2842         (global var storage_source_class) New var.
2843         (open_storage_file) New function.
2844         (storage_sink_destroy) New function.
2845         (storage_sink_make_source) New function.
2846         (storage_sink_open) New function.
2847         (storage_sink_write) New function.
2848         (storage_source_count) New function.
2849         (storage_source_destroy) New function.
2850         (storage_source_get_cases) New function.
2851         (storage_source_on_disk) New function.
2852         (storage_source_read) New function.
2853         (storage_source_set_cases) New function.
2854         (storage_source_to_disk) New function.
2855         (storage_to_disk) New function.
2856         (struct storage_stream_info) New structure.
2857         (write_storage_file) New function.
2858         (procedure_write_case) Removed.
2859         (create_case_source) Add `struct dictionary *' parameter, all
2860         references updated.
2861         (create_case_sink) Ditto.
2862         (free_case_sink) New function.
2863         (struct split_aux_data) New structure.
2864         (procedure_with_splits) New function implementing what procedure()
2865         used to.
2866         (SPLIT_FILE_proc_func) Removed.
2867         (procedure_with_splits_callback) New function.
2868         (equal_splits) New function.
2869         
2870         * aggregate.c: Pass around a struct instead of using statics.
2871         (static var outfile) Remove.
2872         (enum type) Give it tag `missing_treatment'.
2873         (static var missing) Remove.
2874         (static var sort) Remove.
2875         (static var agr_first) Remove.
2876         (static var agr_next) Remove.
2877         (static var case_count) Remove.
2878         (static var prev_case) Remove.
2879         (static var buf64_1xx) Remove.
2880         (static var buf_1xx) Remove.
2881         (struct agr_proc) New structure incorporating the above.
2882         (cmd_aggregate) Use new struct.  Clean up error handling using
2883         agr_destroy().  Completely rewrite actual implementation of
2884         aggregation.
2885         (create_sysfile) Add struct agr_proc * parameter, modify
2886         accordingly.
2887         (parse_aggregate_functions) Ditto.
2888         (free_aggregate_functions) Ditto.  Rename agr_destroy().
2889         (aggregate_single_case) Add struct agr_proc * parameter, modify
2890         accordingly.
2891         (accumulate_aggregate_info) Ditto.
2892         (dump_aggregate_info) Ditto.
2893         (initialize_aggregate_info) Ditto.
2894         (agr_00x_trns_proc) Removed.
2895         (agr_00x_end_func) Removed.
2896         (agr_10x_trns_proc) Removed.
2897         (agr_10x_trns_free) Removed.
2898         (agr_10x_end_func) Removed.
2899         (agr_11x_read) Removed.
2900         (agr_11x_finish) Removed.
2901         [DEBUGGING] (debug_print) Removed.
2902         (write_case_to_sfm) Add struct agr_proc * parameter, modify
2903         accordingly.
2904         (agr_to_active_file) New function.
2905         (presorted_agr_to_sysfile) New function.
2906         (sort_agr_to_sysfile) New function.
2907
2908         * autorecode.c: (cmd_autorecode) Use procedure_with_splits().
2909
2910         * crosstabs.q: (internal_cmd_crosstabs) Ditto.
2911
2912         * descript.q: (cmd_descriptives) Ditto.
2913
2914         * dfm.c: (cmd_begin_data) Check for storage_source_class.  Adapt
2915         to new procedure() interface.
2916
2917         * command.c: (cmd_execute) Adapt to new procedure() interface.
2918
2919         * dictionary.c: (dict_compact_values) Also delete scratch
2920         variables.
2921         (dict_get_compacted_value_cnt) New function.
2922         (dict_get_compacted_idx_to_fv) New function.
2923
2924         * flip.c: (cmd_flip) Warn about and cancel TEMPORARY.
2925         (cmd_flip) Adapt to new procedure() interface.
2926         (flip_sink_write) Use sink->idx_to_fv.
2927
2928         * frequencies.q: (internal_cmd_frequencies) Use
2929         procedure_with_splits().
2930
2931         * get.c: (cmd_save_internal) Adapt to new procedure() interface.
2932         (static var mtf_sink) New static var.
2933         (static var mtf_case) New static var.
2934         (cmd_match_files) Warn about and cancel TEMPORARY.  Redo the way
2935         we actually implement the matching.
2936         (mtf_delete_file_in_place) Use mtf_case.
2937         (mtf_processing) Use mtf_case and mtf_sink.
2938         (cmd_export) Adapt to new procedure() interface.
2939
2940         * levene.c: (levene) Use procedure_with_splits().
2941
2942         * list.q: (cmd_list) Use procedure_with_splits().
2943
2944         * matrix-data.c: (read_matrices_without_rowtype) Adapt to new
2945         procedure() interface.
2946         (read_matrices_with_rowtype) Ditto.
2947
2948         * modify-vars.c; (cmd_modify_vars) Warn about and cancel
2949         TEMPORARY.  Adapt to new procedure() interface.
2950
2951         * rename-vars.c: Warn about and cancel TEMPORARY.
2952
2953         * sort.c: (cmd_sort_cases) Warn about TEMPORARY.
2954         (sort_cases) Use dict_get_compacted_value_cnt() instead of
2955         compaction_nval.  Adapt to new procedure() interface.  Use
2956         storage_source_to_disk().
2957         (do_internal_sort) Don't try to dump the cases to memory.
2958         (compare_case_lists) Pass null idx_to_fv.
2959         (struct initial_run_state) Add `idx_to_fv' member.  Remove
2960         `case_size' member.
2961         (write_initial_runs) Don't initialize irs->case_size.  Adapt to
2962         new procedure() interface.  Reset irs->idx_to_fv after calling
2963         procedure().
2964         (sort_sink_write) Set irs->idx_to_fv.  Use case_size from struct
2965         sort_cases_pgm.  Pass irs, not struct sort_cases_pgm to
2966         push_heap().
2967         (destroy_initial_run_state) Don't dereference irs after freeing
2968         it.
2969         (allocate_cases) Don't calculate case_size locally.
2970         (compare_record) Add idx_to_fv parameter.
2971         (compare_record_run) Change parameter from struct sort_cases_pgm *
2972         to struct initial_run_state *.  Pass irs->idx_to_fv to
2973         compare_record().
2974         (compare_record_run) Third parameter now a struct
2975         initial_run_state *.
2976         (output_record) No need for out_case anymore.  Pass irs, not
2977         struct sort_cases_pgm to pop_heap().  Use case_size from struct
2978         sort_cases_pgm.
2979         (merge) Use case_size from struct sort_cases_pgm.
2980         (merge_once) Use case_size from struct sort_cases_pgm.
2981         Pass null pointer to compare_record() as idx_to_fv.
2982         (global var sort_sink_class) Make static.
2983
2984         * t-test.q: (cmd_t_test) Use procedure_with_splits().
2985
2986         * temporary.c: Remove debugging crap.
2987
2988 Sat Mar 13 14:19:52 WST 2004 John Darrington <john@darrington.wattle.id.au>
2989
2990         * t-test.q, levene.c: Fixed up the handling of MISSING values
2991         int the T-TEST
2992
2993 Fri Mar 12 16:23:35 WST 2004 John Darrington <john@darrington.wattle.id.au>
2994
2995         * t-test.q, levene.c: Added support for T-TEST /GROUP where only 
2996         one value is given.
2997
2998 Wed Mar 10 23:25:13 2004  Ben Pfaff  <blp@gnu.org>
2999
3000         Change explicit variable name checks into use of
3001         dict_class_from_id().
3002
3003         * dictionary.c: (dict_create_var)  Change explicit variable name
3004         check into use of dict_class_from_id().
3005
3006         * get.c: (trim_dictionary) Ditto.
3007
3008         * sel-if.c: (cmd_filter) Ditto.
3009
3010         * sysfile-info.c: (cmd_display) Ditto.
3011
3012         * vars-prs.c: (parse_DATA_LIST_vars) Ditto.
3013
3014         * vfm.c: (arrange_compaction) Ditto.
3015
3016         * weight.c: (cmd_weight) Ditto.
3017
3018 Wed Mar 10 21:16:34 2004  Ben Pfaff  <blp@gnu.org>
3019
3020         * temporary.c: (cmd_temporary) When TEMPORARY was the first
3021         transformation following the input program, if any, for some
3022         reason we special-cased f_trns.  That's just wrong.  It should
3023         always be set to n_trns.
3024
3025 Tue Mar  9 23:44:40 2004  Ben Pfaff  <blp@gnu.org>
3026
3027         * format.c: (parse_format_specifier_name) Fix brown-bag bug
3028         introduced in last check-in.
3029
3030 Tue Mar  9 23:10:41 2004  Ben Pfaff  <blp@gnu.org>
3031
3032         * format.c: (global array translate_fmt[]) Removed.
3033         (translate_fmt) New function as replacement.
3034         (parse_format_specifier_name) Rewrite.
3035
3036         * pfm-read.c: (convert_format) Use translate_fmt() instead of
3037         translate_fmt[].
3038
3039         * sfm-read.c: (parse_format_spec) Ditto.
3040
3041         * postscript.c: (text) Fix handling of fonts with missing
3042         ligatures.
3043
3044         * sort.c: (struct external_sort) Add temp_name member.
3045         (destroy_external_sort) Free temp_dir, temp_name members.
3046         (init_external_sort) Allocate temp_name.
3047         (get_temp_file_name) Change prototype.
3048         (open_temp_file) Deal with change to get_temp_file_name().
3049         (close_temp_file) Ditto.
3050         (remove_temp_file) Ditto.
3051         (write_temp_file) Ditto.
3052         (read_temp_file) Ditto.
3053         (sort_sink_destroy) Removed.
3054         (sort_sink_class) Change destroy member to null.
3055
3056 Tue Mar  9 22:36:34 2004  Ben Pfaff  <blp@gnu.org>
3057
3058         Eliminate temp_case.
3059
3060         * aggregate.c: (cmd_aggregate) No need to save/restore temp_case
3061         anymore.  Use agr_11x_finish().
3062         (aggregate_single_case) Make first param const.
3063         (accumulate_aggregate_info) Ditto.
3064         (agr_00x_end_func) Use compaction_case, not temp_case.
3065         (agr_11x_func) Break into agr_11x_read(), agr_11x_finish().
3066
3067         * data-list.c: (struct data_list_pgm) Add `case_size' member.
3068         (cmd_data_list) Initialize case_size.
3069         (read_from_data_list_fixed) Add struct ccase * param, use instead
3070         of temp_case.
3071         (read_from_data_list_free) Ditto.
3072         (read_from_data_list_list) Ditto.
3073         (read_one_case) Rename data_list_trns_proc(), all references
3074         updated.  Add argument in calling above functions.  Use c
3075         argument instead of temp_case.
3076         (destroy_dls) Rename data_list_trns_free(), all references
3077         updated.
3078
3079         * expr-evl.c: (expr_evaluate) Make second parameter const.
3080
3081         * file-type.c: (struct file_type_pgm) Add `case_size' member.
3082         (cmd_end_file_type) Initialize `case_size'.
3083         (file_type_source_read) Add struct ccase * parameter.  Use instead
3084         of temp_case.
3085
3086         * flip.c: Rewritten.
3087
3088         * get.c: (struct get_pgm) New structure to keep track of
3089         case_size.
3090         (cmd_get) Initialize case_size.
3091         (cmd_import) Ditto.
3092         (get_source) Deal with struct get_pgm.
3093         (get_source_read) Add struct ccase * parameter, use instead of
3094         temp_case.
3095         (import_source_read) Ditto.
3096
3097         * get.c: Use a null pointer instead of temp_case to represent the
3098         "current case" in a struct mtf_file's input member.
3099         (mtf_processing_finish) Pass null to mtf_processing(), not
3100         temp_case.
3101         (mtf_read_nonactive_records) Don't set iter->input to temp_case.
3102         (mtf_compare_BY_values) Add extra arg, use instead of null input
3103         members.
3104         (mtf_processing) Use c parameter instead of temp_case.  Pass
3105         compaction_case to process_active_file_output_case().
3106         
3107         * glob.c: (global variable temp_case) Removed.
3108
3109         * inpt-pgm.c: (struct input_program_pgm) Add `case_size' member.
3110         (cmd_input_program) Initialize case_size.  Set
3111         vfm_source->value_cnt.
3112         (init_case) Add struct ccase * parameter, use instead of
3113         temp_case.
3114         (clear_case) Ditto.
3115         (input_program_source_read) Ditto.
3116
3117         * matrix-data.c: (matrix_data_read_without_rowtype) Ditto.
3118         (dump_cell_content) Ditto.
3119         (nr_output_data) Ditto.
3120         (read_matrices_without_rowtype) Ditto.
3121         (matrix_data_read_with_rowtype) Ditto.
3122         (wr_read_splits) Ditto.
3123         (wr_output_data) Ditto.
3124
3125         * sort.h: (struct sort_cases_pgm) New member `case_size'.
3126         
3127         * sort.c: (sort_cases) Initialize scp->case_size.
3128         (struct external_sort) Remove `case_size' member.
3129         (write_initial_runs) Only call vfm_sink->class_destroy if
3130         non-null.
3131         (struct sort_source_aux) New structure.
3132         (sort_source_read_helper) New function.
3133         (sort_source_read) Use sort_source_read_helper().
3134         (read_sort_output) Change interface to be more reasonable.
3135         (read_internal_sort_output) Ditto.
3136         (read_external_sort_output) Ditto.
3137
3138         * vars-prs.c: (dict_class_to_name) Pass return value through
3139         gettext.
3140
3141         * vfm.c: (struct procedure_aux_data) Add `trns_case' member.
3142         (procedure) Initialize trns_case.
3143         (procedure) Pass trns_case to vfm_source->class->read().
3144         Free trns_case.
3145         (process_active_file) Start using struct procedure_aux_data.
3146         (process_active_file_write_case) Pass trns_case to
3147         transformations, lag_case(), clear_case().
3148         (process_active_file_output_case) Add struct ccase * parameter.
3149         (create_trns_case) New function.
3150         (make_temp_case) Removed.
3151         (vector_initialization) Removed.
3152         (close_active_file) Only call make_source if non-null, otherwise
3153         set vfm_source to null pointer.  Don't free temp_case.
3154         (disk_source_read) Add struct ccase * parameter, use instead of
3155         temp_case.
3156         (memory_source_read) Ditto.
3157         (lag_case) Add const struct ccase * member.
3158         (procedure_write_case) Use trns_case instead of temp_case.
3159         (clear_case) Add struct ccase * member, use instead of temp_case.
3160         (exclude_this_case) Ditto.
3161         (create_case_source) Add struct dictionary * parameter, use to
3162         initialize source->value_cnt.
3163
3164         * vfm.h: (struct case_source) Add `value_cnt' member.
3165         (struct case_source_class) Add struct ccase * parameter to `read'
3166         member function pointer.
3167         (struct case_sink_class) Make struct ccase * parameter const in
3168         `write' member function pointer.
3169         
3170 Wed Mar  3 20:44:37 2004  Ben Pfaff  <blp@gnu.org>
3171
3172         Fix a lot of "possibly uninitialized variable" warnings.  Some of
3173         them are even real bugs.  A few of them make me wonder how the
3174         code ever worked.
3175
3176         * aggregate.c: (parse_aggregate_functions) Initialize `function.
3177
3178         * ascii.c: (output_lines) Add default case to switch.
3179
3180         * crosstabs.q: Remove static variable `expected' and all
3181         references to it.
3182         (display_crosstabulation) Always calculate expected value.
3183         (calc_chisq) Ditto.
3184         (output_pivot_table) Initialize `cmp'.
3185         (display_crosstabulation) New variable `last_row', which is
3186         initialized.
3187
3188         * data-in.c: (parse_numeric) Always initialize sign.  How did this
3189         work at all?!
3190
3191         * data-list.c: (repeating_data_trns_proc) Always initialize code.
3192         Always set info.ofs.  (How did this work?!)
3193
3194         * expr-opt.c: (optimize_tree) Always initialize `m'.
3195         (evaluate_tree) Always initialize `c'.  (How did this work?)
3196
3197         * frequencies.q: (frq_custom_variables) Always initialize min,
3198         max.
3199         (frq_custom_grouped) Always initialize `dl'.
3200
3201         * groff-font.c: (groff_read_font) Always initialize char_set.
3202
3203         * matrix-data.c: (nr_output_data) Initialize `split'.
3204         (wr_read_splits) Remove shadowing split_cnt declaration.
3205         (wr_output_data) Initialize `split'.
3206
3207         * output.c: (tokener) Skip add character on syntax error.
3208
3209         * pool.c: (pool_strndup) Always set `copy'.  (How did this work?!)
3210
3211         * postscript.c: (read_ps_encodings) Use line.string instead of
3212         uninitialized `bp'.
3213         (write_text) Add default case to switch.
3214         (text) Always initialize multiple variables.  Fix bug with
3215         ligatures.
3216
3217         * print.c: (fixed_parse_fortran) Initialize head.
3218         (alloc_line) Add default case to switch.
3219
3220         * recode.c: (parse_dest_spec) Handle case where nothing matches.
3221         (recode_trns_proc) Move variable declaration inward.  Add default
3222         case to switch.
3223
3224         * sfm-read.c: (read_header) Initialize skip_amt.
3225
3226         * sysfile-info.c: (display_variables) Always initialize pc.
3227
3228         * vars-prs.c: Initialized `included'.
3229
3230 Wed Mar  3 09:30:09 2004  Ben Pfaff  <blp@gnu.org>
3231
3232         * main.c: (main) sigaction()'s sa_flags member was uninitialized.
3233         Just use signal() instead.
3234
3235 Wed Mar  3 09:26:30 2004  Ben Pfaff  <blp@gnu.org>
3236
3237         Get rid of vfm_sink_info and vfm_source_info.
3238         
3239         * aggregate.c: (agr_00x_end_func) Don't increment
3240         sfm_sink_info.ncases.
3241
3242         * sort.c: (do_internal_sort) Get case count from
3243         vfm_source->class->count().
3244         (struct external_sort) Add `case_size' member.
3245         (do_external_sort) Initialize case_size.
3246         (struct initial_run_state) Add `case_size' member.
3247         (write_initial_runs) Initialize case_size.
3248         (sort_sink_write) Use case_size.
3249         (read_external_sort_output) Use case_size.  Get case_cnt from
3250         initial_runs.
3251
3252         * vfm.c: (struct write_case_data) Add underscores to existing arg
3253         names, all references updated.  Renamed `aux' as `func_aux', all
3254         references updated.  Added new `aux' member.
3255         (global var vfm_source_info) Removed.
3256         (global var vfm_sink_info) Removed.
3257         (struct procedure_aux_data) New.
3258         (struct split_aux_data) New.
3259         (procedure) Use `aux' fields for procedure_aux_data,
3260         split_aux_data.
3261         (process_active_file_write_case) Pass case_count + 1 to
3262         transformation procedures, exclude_this_case().
3263         (process_active_file_output_case) Don't increment
3264         vfm_sink_info.ncases.
3265         (prepare_for_writing) Don't initialize vfm_sink_info.  Don't try
3266         to send data to disk early.
3267         (make_temp_case) Don't use vfm_sink_info.case_size.
3268         (close_active_file) Don't initialize vfm_source_info.
3269         (struct disk_stream_info) New, to allow for case_cnt and case_size fields.
3270         (disk_sink_create) Initialize and/or update disk_stream_info.
3271         (disk_sink_write) Ditto.
3272         (disk_sink_destroy) Ditto.
3273         (disk_sink_make_source) Ditto.
3274         (disk_source_read) Ditto.
3275         (disk_source_destroy) Ditto.
3276         (global var disk_source_class) Add disk_source_count().
3277         (disk_source_count) New function.
3278         (struct memory_sink_info) Add `case_cnt', `case_size' members.
3279         (struct memory_source_info) Ditto.
3280         (memory_sink_create) Deal with case_cnt, case_size.
3281         (memory_sink_write) Ditto.
3282         (memory_sink_make_source) Ditto.
3283         (memory_source_read) Ditto.
3284         (memory_source_count) New function.
3285         (memory_source_class) Add memory_source_count().
3286         (procedure_write_case) Don't use vfm_sink_info.ncases.  Do use
3287         proc_aux->cases_written, and pass it to transformation procedures
3288         and exclude_this_case ().
3289         (exclude_this_case) Add case_num parameter.  Pass it to
3290         expr_evaluate().
3291         (SPLIT_FILE_procfunc) Use split_aux->prev_case instead of static
3292         variable.
3293
3294         * vfm.h: (struct case_source_class) Add `count' member.
3295
3296         * vfmP.h: (struct stream_info) Removed.
3297         (global variable vfm_source_info) Removed.
3298         (global variable vfm_sink_info) Removed.
3299         
3300 Tue Mar  2 23:38:17 2004  Ben Pfaff  <blp@gnu.org>
3301
3302         * var.h: (typedef trns_proc_func) New typedef.
3303         (trns_free_func) New typedef.
3304         (struct trns_header) Change `proc' to type trns_proc_func, `free'
3305         to type trns_free_func.  This only changes the actual type of
3306         trns_proc_func, adding a `case_num' parameter.  Updated all
3307         implementations to use the typedefs instead.
3308
3309         * compute.c: (compute_num) Pass case_num to expr_evaluate().
3310         (compute_num_vec) Ditto.
3311         (compute_str) Ditto.
3312         (compute_str_vec) Ditto.
3313
3314         * do-if.c: (do_if_trns_proc) Ditto.
3315
3316         * expr-evl.c: (expr_evaluate) Add new case_num parameter, use for
3317         OP_CASENUM.
3318
3319         * inpt-pgm.c: (input_program_source_read) Maintain case count,
3320         pass to transformation functions.
3321         (reread_trns_proc) Pass case_num arg to expr_evaluate().
3322
3323         * loop.c: (loop_1_trns_proc) Ditto.
3324         (loop_2_trns_proc) Ditto.
3325         (loop_3_trns_proc) Ditto.
3326
3327         * print.c: (print_space_trns_proc) Ditto.
3328
3329         * sel-if.c: (select_if_proc) Ditto.
3330
3331 Tue Mar  2 11:36:52 2004  Ben Pfaff  <blp@gnu.org>
3332
3333         * frequencies.q: (cleanup_freq_tab) Avoid memory leak by
3334         destroying hash table.
3335
3336         * glob.c: (read_active_file) Variable not referenced, removed.
3337         (cancel_input_pgm) Ditto.
3338
3339         * levene.c: Add #include <stdlib.h> needed to call free().
3340
3341         * aggregate.c: (parse_aggregate_functions) Make `function'
3342         variable const.
3343
3344 Tue Mar  2 11:30:56 2004  Ben Pfaff  <blp@gnu.org>
3345
3346         Start working to eliminate VFM dependence on static variables.
3347
3348         * command.c: (cmd_parse) Use case_source_is_class().
3349
3350         * data-list.c: Rewrite to eliminate use of static variables.
3351
3352         * dfm.c: (cmd_begin_data) Use case_source_is_class().
3353
3354         * file-handle.q: (fh_handle_name) Make parameter const.
3355
3356         * file-type.c: Rewrite to eliminate use of static variables.
3357
3358         * flip.c: Rewrite to eliminate use of static variables.
3359
3360         * format.c: (get_format_var_width) New function.
3361
3362         * get.c: Eliminate use of static variables.
3363
3364         * inpt-pgm.c: Eliminate use of static variables.
3365
3366         * matrix-data.c: Eliminate use of static variables.
3367
3368         * set.q: (set_max_workspace) New variable.
3369         (cmd_set) Use SET WORKSPACE to modify set_max_workspace.
3370
3371         * var.h: (struct case_list) Move here from vfmP.h.
3372
3373         * vars-atr.c: (discard_variables) Handle new vfm_source type.
3374
3375         * vfm.c: (vfm_source) Change type from struct case_stream to
3376         struct case_source.
3377         (vfm_sink) Change type from struct case_stream to struct
3378         case_sink.
3379         (static var paging) Rename workspace_overflow, all references
3380         updated.
3381         (procedure) Use new class structures.
3382         (process_active_file) Ditto.
3383         (process_active_file_write_case) Ditto.
3384         (prepare_for_writing) Use set_max_workspace.  Use new class
3385         structures.
3386         (close_active_file) Use new class structures.  Free old sink.
3387         (global var disk_source_file) Removed.
3388         (global var disk_sink_file) Removed.
3389         (disk_stream_init) Removed.
3390         (disk_stream_read) Removed.
3391         (disk_stream_write) Removed.
3392         (disk_stream_mode) Removed.
3393         (disk_stream_destroy_source) Removed.
3394         (disk_stream_destroy_sink) Removed.
3395         (global var vfm_disk_stream) Removed.
3396         (disk_sink_create) New function.
3397         (disk_sink_write) New function.
3398         (disk_sink_destroy) New function.
3399         (disk_sink_make_source) New function.
3400         (disk_sink_class) New static var.
3401         (disk_source_read) New function.
3402         (disk_source_destroy) New function.
3403         (global var vfm_source_class) New var.
3404         (global var memory_source_cases) Removed.
3405         (global var memory_sink_cases) Removed.
3406         (global var memory_sink_max_cases) Removed.
3407         (struct memory_sink_info) New struct.
3408         (memory_stream_init) Removed.
3409         (memory_stream_read) Removed.
3410         (memory_stream_write) Removed.
3411         (memory_stream_mode) Removed.
3412         (memory_stream_destroy_source) Removed.
3413         (memory_stream_destroy_sink) Removed.
3414         (global var vfm_memory_stream) Removed.
3415         (page_to_disk) Renamed write_active_file_to_disk().
3416         (memory_sink_create) New function.
3417         (memory_sink_write) New function.
3418         (memory_sink_destroy) New function.
3419         (memory_sink_make_source) New function.
3420         (memory_sink_class) New static var.
3421         (memory_source_read) New function.
3422         (memory_source_destroy) New function.
3423         (memory_source_get_cases) New function.
3424         (memory_source_set_cases) New function.
3425         (global var vfm_source_class) New var.
3426         (procedure_write_case) Use new class structures.
3427         (create_case_source) New function.
3428         (case_source_is_complex) New function.
3429         (case_source_is_class) New function.
3430         (create_case_sink) New function.
3431
3432         * vfm.h: (global variable reinit_sysmis) Not used, removed.
3433         (global variable reinit_blanks) Not used, removed.
3434         (global variable init_zero) Not used, removed.
3435         (global variable init_blanks) Not used, removed.
3436         (struct case_source) New struct.
3437         (struct case_source_class) New struct.
3438         (struct case_sink) New struct.
3439         (struct case_sink_class) New struct.
3440         (struct case_stream) Removed.
3441
3442         * vfmP.h: (struct case_list) Moved to var.h.
3443
3444 Tue Mar  2 11:28:30 2004  Ben Pfaff  <blp@gnu.org>
3445
3446         * algorithm.c: (count_equal) New function.
3447         (count_if) New function.
3448         (unique) Add assertions.
3449         (partition) Add assertions.
3450         (is_partitioned) New function.
3451         (copy_if) Add assertions.
3452         (remove_equal) Add assertions.
3453         (lexicographical_compare) Rename lexicographical_compare_3way.
3454         (sort) Add assertions.  Rephrase some code.
3455         (is_sorted) New function.
3456
3457 Sun Feb 29 23:24:57 2004  Ben Pfaff  <blp@gnu.org>
3458
3459         Rewrite SORT CASES.
3460
3461         * sort.c: Completely rewrite.
3462
3463         * sort.h: Expose interface via struct sort_cases_pgm, not via
3464         global variables.
3465
3466         * aggregate.c: (sort) New static var.
3467         (cmd_aggregate) Use sort.
3468         (create_sysfile) Ditto.
3469         (aggregate_single_case) Ditto.
3470         (dump_aggregate_info) Ditto.
3471         (agr_00x_end_func) Ditto.
3472         (debug_print) Ditto.
3473
3474         * var.h: (enum SRT_ASCEND) Removed.
3475         (enum SRT_DESCEND) Removed.
3476         (struct sort_cases_proc) Removed.
3477         (struct variable) Remove p.srt member.
3478
3479 Sun Feb 29 23:22:45 2004  Ben Pfaff  <blp@gnu.org>
3480
3481         Get rid of the old, crappy heap structure and replace it by a new,
3482         shiny, C++ STL-like heap structure.
3483         
3484         * Makefile.am: (pspp_SOURCES) Remove heap.c, heap.h.
3485
3486         * algorithm.c: (push_heap) New function.
3487         (heapify) Ditto.
3488         (pop_heap) Ditto.
3489         (make_heap) Ditto.
3490         (sort_heap) Ditto.
3491         (is_heap) Ditto.
3492         
3493         * heap.c: Removed.
3494
3495         * heap.h: Removed.
3496
3497 Sun Feb 29 23:21:53 2004  Ben Pfaff  <blp@gnu.org>
3498
3499         Increase warning level.
3500         
3501         * Makefile.am: (AM_CFLAGS) Remove -Wnouninitialized.
3502
3503 Sat Feb 21 17:38:58 WST 2004 John Darrington <john@darrington.wattle.id.au>
3504
3505         * main.c: Added a signal handler for SIGSEGV requesting a bug report.
3506          
3507 Fri Feb 20 23:22:14 2004  Ben Pfaff  <blp@gnu.org>
3508
3509         * dictionary.c: (dict_create_var) Fix root cause of bug worked
3510         around by previous change log entry.
3511         
3512         * compute.c: (lvalue_finalize) Remove workaround from previous
3513         change log entry.
3514
3515 Fri Feb 20 14:37:41 WAST 2004 John Darrington <john@darrington.wattle.id.au>
3516
3517         * compute.c: Fixed a bug where the Format was not getting set for 
3518           computed variables (thus causing a crash when SAVEing).
3519
3520         * Added a test to stop this bug ever coming back
3521
3522 Wed Feb 18 22:21:35 2004  Ben Pfaff  <blp@gnu.org>
3523
3524         Got rid of approx.h.  In general, replaced all references to
3525         approx_eq() by ==, approx_lt() by <, etc.  Other types of changes
3526         noted below.
3527
3528         * Makefile.am: (pspp_SOURCES) Removed approx.h.
3529
3530         * data-out.c: (try_F) Replaced test for approx_eq(number, 0.0) by
3531         test for mag < EPSILON.
3532
3533         * misc.h: Add definition of EPSILON.
3534
3535 Wed Feb 18 21:32:44 2004  Ben Pfaff  <blp@gnu.org>
3536
3537         * vfm.c: (procedure) Add check to prevent recursive call.
3538
3539 Wed Feb 18 21:48:54 WST 2004 John Darrington <john@darrington.wattle.id.au>
3540
3541         * Moved the declarations relating to values to their own header file
3542           (val.h)
3543
3544         * Added levene.c and levene.h
3545
3546         * vars-atr.c: Changed the signature of compare_values to 
3547         take const * arguments.
3548                 
3549         * t-test.q: Changed the structure of struct t_test_proc 
3550        variables now contain their own group statistics information.
3551        Eventually, t_test_proc might get renamed, because it'd be 
3552        applicable to other commands too.
3553
3554 Mon Feb 16 23:15:51 2004  Ben Pfaff  <blp@gnu.org>
3555
3556         * data-out.c: Clean up.  Changed interface of convert_*() to take
3557         either a `double' or a `const char *' instead of a `const union
3558         value *'.  Update all implementations of those interfaces.
3559         (data_out) Use switch statements instead of a table.
3560         (convert_AHEX) Rewrite.
3561
3562         * format.h: Update comment.
3563
3564 Mon Feb 16 22:14:36 2004  Ben Pfaff  <blp@gnu.org>
3565
3566         * q2c.c: (dump_header) Add an Emacs header line to output files
3567         that makes generated .c files read-only by default, to make it
3568         difficult to accidentally change generated files.
3569
3570 Mon Feb 16 22:12:07 2004  Ben Pfaff  <blp@gnu.org>
3571
3572         * frequencies.q: (compare_freq_numeric_a) Compare by frequency,
3573         not bogus a->v.c <=> b->v.c pointer compare.
3574         (compare_freq_alpha_a) Ditto.
3575         (compare_freq_numeric_d) Ditto.
3576         (compare_freq_alpha_d) Ditto.
3577         
3578 Mon Feb 16 22:00:53 2004  Ben Pfaff  <blp@gnu.org>
3579
3580         Changed data_out() to store string data directly into a `union
3581         value''s s member, not indirectly into c.
3582
3583         * crosstabs.q: (output_pivot_table) Use format_short() instead of
3584         data_out().
3585         (table_value_missing) Ditto.
3586         (float_M_suffix) Ditto.
3587         (format_short) New function.
3588
3589         * data-in.h: (data_in_finite_line) Remove inline definition.
3590
3591         * data-list.c: (destroy_dls_var_spec) New function.
3592         (destroy_dls) Rewrite in terms of destroy_dls_var_spec().
3593         (data_list_source_destroy_source) Avoid cast.
3594         (struct repeating_data_trns) New field `id_value'.  Update
3595         comments.
3596         (cmd_repeating_data) Initialize id_value.  Use new
3597         repeating_data_trns_free() for freeing REPEATING DATA
3598         transformations.
3599         (rpd_parse_record) Rewrite support for record ID to be less bogus.
3600         (repeating_data_trns_free) New function.
3601
3602         * data-out.c: (data_out) Change return type to `void' by replacing
3603         error returns by writing a message into the output buffer.
3604         (convert_A) Read from v->s instead of v->c.
3605         (convert_AHEX) Ditto.
3606
3607         * expr-evl.c: Update comment.
3608         (expr_evaluate) Add assertion in OP_STRING case.
3609
3610         * format.h: (macro MAX_FORMATTED_LEN) New macro.
3611
3612         * list.q: (list_cases) Update for new data_out() semantics.
3613
3614         * print.c: (print_trns_proc) Ditto.
3615
3616         * tab.c: (tab_value) Ditto.
3617         (tab_float) Avoid stupid cast.
3618
3619         * var.h: Update comments.
3620         (macro MAX_STRING) New macro.
3621         (macro MAX_ELEMS_PER_VALUE) New macro.
3622
3623         * vars-atr.c: (compare_values) New function.
3624
3625         * vfm.c: (dump_splits) Update for new data_out() semantics.
3626
3627 Mon Feb 16 21:45:47 2004  Ben Pfaff  <blp@gnu.org>
3628
3629         * crosstabs.q: (struct table_entry) Rename v[] to values[].  All
3630         references updated.
3631         (struct crosstab) Rename v[] to vars[].  All references updated.
3632         (hash_table_entry) Replace the hash algorithm and fix a bug at the
3633         same time, which caused the hash value to depend only on a single
3634         value, not all of the variables' values.
3635         
3636 Mon Feb 16 12:49:53 2004  Ben Pfaff  <blp@gnu.org>
3637
3638         Clean up struct dictionary's value_cnt usage.
3639
3640         * dictionary.c: Add a function comment to each function.
3641         (struct dictionary) Rename value_cnt to next_value_idx, which more
3642         accurately reflects its meaning.  All references updated.
3643         (dict_rename_vars) Add assertion.
3644         (dict_get_value_cnt) Rename dict_get_next_value_idx().  All
3645         references updated.
3646         (dict_get_case_size) New function.
3647
3648         * aggregate.c: (create_sysfile) Use dict_get_case_size().
3649
3650         * get.c: (mtf_read_nonactive_records) Ditto.
3651
3652         * sort.c: (allocate_cases) Ditto.
3653         (write_initial_runs) Ditto.
3654         (merge) Ditto.
3655         (merge_once) Ditto.
3656
3657         * vfm.c: (prepare_for_writing) Ditto.
3658         (setup_lag) Ditto.
3659         (lag_case) Ditto.
3660
3661 Mon Feb 16 00:17:55 2004  Ben Pfaff  <blp@gnu.org>
3662
3663         Make vfm.c slightly less grotesque.
3664
3665         * vfm.c: (filter_var) Removed.
3666         (filter_index) Removed.
3667         (FILTERED macro) Removed.
3668         (exclude_this_case) New function.
3669         (process_active_file_write_case) Use exclude_this_case() instead
3670         of FILTERED and inline tests.
3671         (procedure_write_case) Ditto.
3672         (setup_filter) Removed.
3673         (open_active_file) Don't call setup_filter().
3674         (close_active_file) Call dict_get_filter() instead of checking
3675         filter_var.
3676
3677 Mon Feb 16 00:01:53 2004  Ben Pfaff  <blp@gnu.org>
3678
3679         * var.h: (struct variable) Update comments.
3680
3681 Sun Feb 15 23:14:59 2004  Ben Pfaff  <blp@gnu.org>
3682
3683         New functions dict_create_var_assert(), dict_lookup_var_assert().
3684         Converted several dict_*_var()/assert pairs into a single
3685         dict_*_var_assert().
3686
3687         * dictionary.c: (dict_create_var_assert) New function.
3688         (dict_lookup_var_assert) New function.
3689
3690 Sun Feb 15 23:06:08 2004  Ben Pfaff  <blp@gnu.org>
3691
3692         Got rid of "struct long_vec", envector(), devector(), etc.  Added
3693         two members `init', `reinit' to struct variable as a substitute.
3694         
3695         * Makefile.am: (pspp_SOURCES) Removed cases.c, cases.h.
3696         
3697         * cases.c: Removed.
3698
3699         * cases.h: Removed.
3700
3701         * aggregate.c: (parse_aggregate_functions) destvar doesn't need
3702         init.
3703
3704         * autorecode.c: (cmd_autorecode) destvars don't need init.
3705
3706         * compute.c: (lvalue_finalize) Set reinit.
3707
3708         * data-list.c: (fixed_parse_compatible) Don't need init usually.
3709         (dump_fmt_list) Ditto.
3710         (parse_free) Ditto.
3711
3712         * descript.q: (run_z_pass) Don't need init for z-scores.
3713
3714         * dictionary.c: (dict_create_var) Initialize `init', `reinit'
3715         members.
3716         (dict_clone_var) Copy `reinit' member, initialize `init' member.
3717
3718         * glob.c: (init_glob) Remove vec_init() calls.
3719
3720         * inpt-pgm.c: (cmd_end_input_program) Use `reinit', not `left'.
3721         
3722         * loop.c: (internal_cmd_loop) Don't need to call envector().
3723
3724         * numeric.c: (cmd_numeric) Ditto.
3725         (cmd_string) Ditto.
3726         (cmd_leave) Ditto.  Set `init', `reinit' members.
3727
3728         * recode.c: (cmd_recode) Don't need to call envector().
3729
3730         * repeat.c: (internal_cmd_do_repeat) Ditto.
3731
3732         * var.h: (struct variable) Remove `left'.  Add `init', `reinit'.
3733         (force_create_variable) Removed prototype.
3734         (force_dup_variable) Ditto.
3735
3736         * vector.c: (cmd_vector) Don't need to call envector().
3737
3738         * vfm.c: (reinit_sysmis) Removed.
3739         (reinit_blanks) Removed.
3740         (init_zero) Removed.
3741         (init_blanks) Removed.
3742         (process_active_file_write_case) No need to deal with vectors.
3743         Call clear_temp_case().
3744         (vector_initialization) Rewrite to use `init', `reinit'.
3745         (close_active_file) No need to call vec_clear().
3746         (procedure_write_case) Call clear_temp_case().
3747         (clear_temp_case) New function.
3748
3749 Sun Feb 15 20:50:36 2004  Ben Pfaff  <blp@gnu.org>
3750
3751         * pfm-write.c: (bufwrite) Get rid of nasty cast that also invoked
3752         undefined behavior.
3753
3754 Thu Feb 12 23:35:15 2004  Ben Pfaff  <blp@gnu.org>
3755
3756         Add auxiliary argument to procedure() interface.  Associated small
3757         clean-ups of vfm interface.
3758         
3759         * Updated every caller of procedure() and process_active_file() to
3760         reflect modified interface.  Simple, ordinary changes not listed
3761         otherwise below.
3762
3763         * Updated every function that implements struct case_stream's
3764         `read' function to take a write_case_func and a write_case_data.
3765         Also updated every caller of write_case() to instead call them
3766         through these arguments.  In some cases this meant that the extra
3767         args had to be threaded through a couple of extra levels.  This
3768         wasn't difficult or interesting so the details won't be given.
3769
3770         * data-list.c: (struct repeating_data_trns) Add members
3771         `write_case', `wc_data' as kluge.
3772         (read_one_set_of_repetitions) Rename repeating_data_trns_proc and
3773         make non-static.
3774         (repeating_data_set_write_case) New function.
3775
3776         * data-list.h: New file to declare repeating_data_trns_proc() and
3777         repeating_data_set_write_case().
3778
3779         * inpt-pgm.c: (input_program_source_read) Call
3780         repeating_data_set_write_case() for all the REPEATING DATA
3781         transformations, so that they know where to send their cases.
3782         It's a big kluge.  Also kluge in END CASE.
3783         (end_case_trns_proc) Never called anymore, but we still need it,
3784         so just assert(0).
3785
3786         * sort.c: (read_sort_output) Update to match struct case_stream
3787         `read' member.
3788
3789         * vfm.c: (struct write_case_data) New structure.
3790         (proc_func) Removed.
3791         (virt_proc_func) Removed.
3792         (begin_func) Removed.
3793         (virt_begin_func) Removed.
3794         (end_func) Removed.
3795         (write_case) Removed.
3796         (procedure) Added an auxiliary parameter to each function pointer
3797         argument's prototype.  Added an auxiliary data parameter.
3798         Rewrote.
3799         (process_active_file) Ditto.
3800         (process_active_file_write_case) Pass aux data along.
3801         (close_active_file) Ditto.
3802         (procedure_write_case) Ditto.
3803         (SPLIT_FILE_procfunc) Ditto.
3804
3805         * vfm.h: (typedef write_case_data) New.
3806         (typedef write_case_func) New.
3807         (struct case_stream) Add parameters to `read' member prototype.
3808         
3809 Thu Feb 12 19:24:53 WST 2004 John Darrington <john@darrington.wattle.id.au>
3810
3811         * t-test.q:  Added calculations for independent samples. (But no Levene
3812         test yet!)
3813
3814         * Makefile.am: Moved q_sources_c into own variable 
3815
3816 Wed Feb 11 23:56:51 2004  Ben Pfaff  <blp@gnu.org>
3817
3818         Miscellaneous cleanups.
3819         
3820         * Change unused to UNUSED in many source files to reflect modified
3821         pref.h.  Change use of __WIN32__, __MSDOS, __DJGPP__,
3822         __CYGWIN32__, __unix__, and unix not to assume that they're
3823         defined to a nonzero value.  Change use of __attribute__ to use
3824         NO_RETURN or PRINTF_FORMAT instead.
3825         
3826         * alloc.h: Move definitions for local_alloc(), local_free() here
3827         from ../pref.h.orig and simplify.
3828
3829         * expr-evl.c: Instead of working differently based on PAGED_STACK,
3830         use a pool allocator unconditionally.
3831         (CHECK_STRING_SPACE) Removed.
3832         (ALLOC_STRING_SPACE) Removed.
3833         (expr_evaluate) Use e->pool instead of CHECK_STRING_SPACE and
3834         ALLOC_STRING_SPACE.
3835
3836         * expr-opt.c: (dump_expression) Allocate string pool.
3837
3838         * expr-prs.c: (expr_free) Free string pool.
3839
3840         * pool.c: (pool_destroy) This pool must be removed from its
3841         parent's list of gizmos, not from its own.  Use free_all_gizmos().
3842         (pool_clear) New function.
3843         (free_all_gizmos) New function.
3844         (pool_alloc) Use space in empty block after this one if any.
3845         (pool_release) Only empty out blocks, don't actually free() them.
3846
3847         * print.c: Get rid of PAGED_STACK special case by always
3848         dynamically allocating line buffers.
3849         (struct print_trns) Always include the `line' member.
3850         (internal_cmd_print) Always initialize the `line' member.
3851         (alloc_line) Always allocate memory for `line'.
3852         (print_trns_proc) Always initialize buf from `line' member.
3853         (print_trns_free) Always free `line' memory.
3854
3855         * sort.c: (allocate_file_handles) Special-case MS-DOS for mkdir()
3856         call.
3857         
3858 Wed Feb 11 20:33:18 2004  Ben Pfaff  <blp@gnu.org>
3859
3860         * flip.c: Fixed crash from FLIP when a numeric variable is
3861           specified on NEWNAMES and a large value is used, and a couple of
3862           other minor bugs besides.
3863           (struct varname) Make name a 9-character fixed-size array
3864           instead of a 1-character variable size array.
3865           (make_new_var) Allow digits in variable names.
3866           (flip_stream_write) Limit numeric values to 8 characters and
3867           format system missing and very large and small values more
3868           appropriately.
3869
3870 Thu Feb  5 13:19:06 WAST 2004 John Darrington <john@darrington.wattle.id.au>
3871
3872         * command.c: Fixed test on command return status for the correct 
3873           value,  which had been causing a crash under certain invalid input.
3874
3875 Wed Feb  4 15:34:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
3876
3877         * t-test.q: Added calculations for the one sample variant of the T-TEST
3878
3879 Tue Feb  3 20:09:54 2004  Ben Pfaff  <blp@gnu.org>
3880
3881         * tab.c: (render_strip) Fix bug that sometimes caused joined text
3882           in joined cells to be rendered outside box boundaries.
3883
3884 Tue Feb  3 18:56:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
3885
3886         * random.c (rng_create): Fixed seeding so that it gets reseeded after
3887         SET seed=xx has been called.
3888
3889 Mon Jan 19 14:08:09 2004  Ben Pfaff  <blp@gnu.org> 
3890
3891         * random.c (rng_get_double): Fix always-returning-zero bug in my
3892         preferred way, and at the same time make sure rounding doesn't
3893         bite us.
3894
3895 Thu Jan  1 23:16:41 2004  Ben Pfaff  <blp@gnu.org>
3896
3897         * html.c: (change_attributes) Dead code, removed.
3898         (escape_string) Eliminate code to call change_attributes() that
3899         never actually called it.
3900         (output_tab_table) Get rid of dependence on tab_hit
3901         and struct tab_joined_cell's hit member, which are abominations.
3902
3903         * tab.c: (tab_output_text) Don't call
3904         d->class->text_set_font_by_name if it's a null pointer.
3905         (macro UNROLL_LOOP) Eliminate.
3906         (macro UNROLL_3_LOOPS) Eliminate.
3907         (tabi_render) Rewrite not to use the above macros.
3908
3909 Thu Jan  1 23:09:07 2004  Ben Pfaff  <blp@gnu.org>
3910
3911         Start working on a new output driver system, one that doesn't suck
3912         so much, by adding a "device-independent" output driver.  The idea
3913         is to write out only a single output stream, then use separate
3914         processes to translate them into whatever formats we want.  This
3915         is similar to how "groff" works with its various output drivers
3916         (grops, grotty, grodvi, ...).
3917         
3918         * Makefile.am: (pspp_SOURCES) Add devind.c, devind.h.
3919
3920         * list.q: (write_all_headers) Stub out devind class.
3921         (clean_up) Ditto.
3922         (determine_layout) Ditto.
3923         (list_cases) Ditto.
3924
3925         * output.c: (outp_init) Add devind class.
3926
3927         * devind.c: New file.
3928
3929         * devind.h: New file.
3930
3931 Thu Jan  1 23:08:14 2004  Ben Pfaff  <blp@gnu.org>
3932
3933         * frequencies.q: (hash_value_alpha) Fixed up the previous change
3934         to use the proper string length.
3935
3936 Wed Dec 31 16:27:33 WAST 2003 John Darrington <john@darrington.wattle.id.au>
3937
3938         * Fixed bug where FREQ would crash on alpha values
3939
3940 Tue Dec 30 22:42:57 2003  Ben Pfaff  <blp@gnu.org>
3941
3942         * Removed bletcherous alloca() workarounds for AIX from top of
3943         many files.  AIX can use the alternative alloca() implementation
3944         instead.
3945
3946 Tue Dec 30 22:35:16 2003  Ben Pfaff  <blp@gnu.org>
3947
3948         * ascii.c: (ascii_option) Fix implementation of headers option.
3949
3950 Tue Dec 30 22:32:53 2003  Ben Pfaff  <blp@gnu.org>
3951
3952         * ascii.c: Add a "squeeze" option to the ASCII driver to squeeze
3953         multiple blank lines into one.
3954         (struct ascii_driver_ext) Add squeeze_blank_lines option.
3955         (ascii_preopen_driver) Initialize squeeze_blank_lines.
3956         (static var option_tab) Add squeeze entry.
3957         (ascii_option) Set squeeze_blank_lines.
3958         (output_lines) Implement squeezing blank lines.
3959
3960 Wed Dec 31 07:19:46 WST 2003 John Darrington <john@darrington.wattle.id.au>
3961
3962         * Removed redundant code from output.h
3963
3964 Sat Dec 27 22:17:52 2003  Ben Pfaff  <blp@gnu.org>
3965
3966         Dictionary classes: each variable is "ordinary", "system", or
3967         "scratch".
3968
3969         * var.h: (enum dict_class) New enum.
3970
3971         * vars-prs.c: (dict_class_from_id) New function.
3972         (dict_class_to_name) New function.
3973
3974 Sat Dec 27 22:16:06 2003  Ben Pfaff  <blp@gnu.org>
3975
3976         * var.h: (struct freq_tab_set) Removed (not used).
3977
3978 Sat Dec 27 22:15:21 2003  Ben Pfaff  <blp@gnu.org>
3979
3980         * value-labels.c: (val_labs_destroy) vls needs to be freed too.
3981
3982 Sat Dec 27 22:10:49 2003  Ben Pfaff  <blp@gnu.org>
3983
3984         * stats.c: (hypercube) Rename pow4().  All references updated.
3985
3986 Sat Dec 27 22:05:49 2003  Ben Pfaff  <blp@gnu.org>
3987
3988         * rename-vars.c: (cmd_rename_variables) Rewritten.
3989         (compare_name) Removed.
3990
3991 Sat Dec 27 22:03:51 2003  Ben Pfaff  <blp@gnu.org>
3992
3993         var_set feature, and code taking advantage of it.
3994         
3995         * crosstabs.q: (static var var_dict) Removed.
3996         (static var variables) New variable.
3997         (static var variables_cnt) New variable.
3998         (cmd_crosstabs) Free variables instead of var_dict.
3999         (internal_cmd_crosstabs) Initialize and use variables,
4000         variables_cnt instead of var_dict.
4001         (free_var_dict) Removed.
4002         (crs_custom_tables) Use var_set instead of a copied dictionary.
4003         (crs_custom_variables) Set up variables, variables_cnt instead of
4004         var_dict.
4005         [DEBUGGING] (debug_print) Ditto.
4006
4007         * means.q: (mns_custom_tables) Use var_set instead of a copied
4008         dictionary.
4009
4010         * vars-prs.c: (parse_vs_variable) New function.
4011         (parse_dict_variable) Rewritten.
4012         (parse_variable) Rewritten.
4013         (parse_variables) Renamed parse_var_set_vars(), rewritten.
4014         (parse_variables) New function in terms of parse_var_set_vars().
4015         Now requires its first argument to be non-null.  All references
4016         that passed a null pointer updated to pass default_dict instead.
4017         (macro id_dict) Removed.
4018         (parse_DATA_LIST_vars) Add assertions.
4019         (parse_mixed_vars) Ditto.
4020         (struct var_set) New structure.
4021         (var_set_get_cnt) New function.
4022         (var_set_get_var) New function.
4023         (var_set_lookup_var) New function.
4024         (var_set_destroy) New function.
4025         (dict_var_set_get_cnt) New function.
4026         (dict_var_set_get_var) New function.
4027         (dict_var_set_lookup_var) New function.
4028         (dict_var_set_destroy) New function.
4029         (var_set_create_from_dict) New function.
4030         (struct array_var_set) New structure.
4031         (array_var_set_get_cnt) New function.
4032         (array_var_set_get_var) New function.
4033         (array_var_set_lookup_var) New function.
4034         (array_var_set_destroy) New function.
4035         (var_set_create_from_array) New function.
4036
4037         * q2c.c: (dump_parser) Use parse_variables(default_dict, ...)
4038         instead of parse_variables(NULL, ...) in output code.
4039
4040 Sat Dec 27 21:38:53 2003  Ben Pfaff  <blp@gnu.org>
4041
4042         Change inp_init from a 2-bit vector to an ordinary array.
4043         Initialize it all in cmd_end_input_program() instead of in
4044         create_variable().
4045
4046         * inpt-pgm.c: (enum value_init_type) New enum.
4047         (global var inp_init) Change to `enum value_init_type *', make
4048         static.
4049         (inp_init_size) Removed.
4050         (inp_nval) Change to `size_t', make static.
4051         (cmd_input_program) Don't initialize inp_init or inp_init_size.
4052         (cmd_end_input_program) Initialize inp_init, inp_nval.
4053         (init_case) Rewrite.
4054         (clear_case) Rewrite.
4055
4056         * inpt-pgm.h: Removed.
4057
4058 Sat Dec 27 21:36:38 2003  Ben Pfaff  <blp@gnu.org>
4059
4060         * hash.c: (hsh_hash_bytes) Use Fowler-Noll-Vo hash instead of
4061         Colin Plumb hash.  It is simpler and should better resist
4062         collisions.
4063         (hsh_hash_string) Ditto.
4064
4065 Sat Dec 27 21:34:57 2003  Ben Pfaff  <blp@gnu.org>
4066
4067         * get.c: (export_write_case_func) Remove debug printing code.
4068
4069 Sat Dec 27 21:11:09 2003  Ben Pfaff  <blp@gnu.org>
4070
4071         * get.c: (cmd_save_internal) Rename parameter.  Use &t->h instead
4072         of cast.
4073         (save_write_case_func) Use &trns->h instead of cast.
4074         (cmd_export) Use &t->h instead of cast.
4075
4076 Sat Dec 27 20:57:42 2003  Ben Pfaff  <blp@gnu.org>
4077
4078         Moved vectors into the dictionary.
4079
4080         * var.h: (struct vector) Moved here from vector.h.  `index' member
4081         renamed `idx', `v' renamed `var', `nv' renamed `cnt'.  All
4082         references updated.
4083         
4084         * vector.h: Removed.
4085
4086         * vector.c: (global var vec) Removed.
4087         (global var nvec) Removed.
4088         (cmd_vector) Rewritten.
4089         (find_vector) Removed.
4090
4091         * dictionary.c: (dict_create_vector) New function.
4092         (dict_get_vector) New function, replaces reading global vec[]
4093         array.
4094         (dict_get_vector_cnt) New function, replaces reading global nvec
4095         variable.
4096         (dict_lookup_vector) New function, replaces find_vector().
4097         (dict_clear_vectors) New function.
4098
4099 Sat Dec 27 20:54:01 2003  Ben Pfaff  <blp@gnu.org>
4100
4101         Start to move away from `struct variable' p `union' member to void
4102         * aux member.
4103
4104         * var.h: (struct variable) Add `aux' member.
4105
4106 Sat Dec 27 20:36:25 2003  Ben Pfaff  <blp@gnu.org>
4107
4108         Get rid of struct variable `foo' member.
4109
4110         * frequencies.q: (internal_cmd_frequencies) Use p.frq.used instead
4111         of foo.
4112         (frq_custom_variables) Ditto.
4113         (frq_custom_grouped) Ditto.
4114
4115         * get.c: (struct save_trns) Change `var' member from `int *' to
4116         `struct variable **'.
4117         (cmd_save_internal) Use aux instead of foo.
4118         (save_trns_proc) Use revised `var' member.
4119         (static var mtf_seq_no) Renamed mtf_seq_num.
4120         (static var mtf_seq_nums) New static var.
4121         (cmd_match_files) Initialize mtf_seq_nums.
4122         (mtf_free) Free mtf_seq_nums.
4123         (mtf_processing) Use mtf_seq_nums instead of foo.
4124         (mtf_merge_dictionary) No need to initialize mv->foo.
4125         (cmd_export) Use aux instead of foo.  Use revised `var' member.
4126         (mns_custom_tables) Don't use foo to check for duplicates, that's
4127         what PV_NO_DUPLICATE is for.
4128
4129         * var.h: (struct variable) Remove `foo' member.
4130         (struct frequencies_proc) New member.
4131         
4132 Sat Dec 27 19:46:13 2003  Ben Pfaff  <blp@gnu.org>
4133
4134         Clean up COMPUTE and IF.
4135
4136         * compute.c: More or less rewrite the darn thing.
4137         (struct compute_trns) Rename and reorder and add and delete
4138         members.
4139         (cmd_compute) Rewrite.
4140         (compute_num) Make conditional on test expression.  Now used for
4141         both COMPUTE and IF.
4142         (compute_num_vec) Ditto.
4143         (compute_str) Ditto.
4144         (compute_str_vec) Ditto.
4145         (cmd_if) Rewrite.
4146         (if_num) Removed.
4147         (if_num_vec) Removed.
4148         (if_str) Removed.
4149         (if_str_vec) Removed.
4150         (parse_target_expression) Renamed parse_rvalue_expression(),
4151         rewritten.
4152         (new_trns) Renamed compute_trns_create(), rewritten.
4153         (delete_trns) Removed.
4154         (free_trns) Renamed compute_trns_free(), rewritten.
4155         (struct lvalue) New structure.
4156         (parse_var_or_vec) Renamed lvalue_parse(), rewritten.
4157         (lvalue_get_type) New function.
4158         (lvalue_is_vector) New function.
4159         (lvalue_finalize) New function.
4160         (lvalue_destroy) New function.
4161         
4162 Sat Dec 27 19:44:14 2003  Ben Pfaff  <blp@gnu.org>
4163
4164         * command.def: Disallow MODIFY VARS in input mode, so that
4165         variables can't get dropped and confuse cmd_end_input_program()'s
4166         attempt to fill inp_init[].
4167         
4168         * modify-vars.c: (static var forward_positional_ordering) New
4169         variable.
4170         (struct var_modification) Entirely changed.
4171         (rearrange_dict) Interface changed, rewritten.
4172         (cmd_modify_vars) Deal with modified struct var_modification, much
4173         rewritten.
4174         (struct var_renaming) New structure.
4175         (compare_var_renaming_by_new_name) New function.
4176         (validate_var_modification) New function.
4177
4178         * var.h: (struct modify_vars_proc) Removed.
4179         (struct variable) Removed member p.mfv.
4180
4181 Sat Dec 27 19:40:26 2003  Ben Pfaff  <blp@gnu.org>
4182
4183         Make EVALUATE a valid command whether we're debugging or not, so
4184         that `make check' can succeed regardless of whether debugging is
4185         turned on.
4186         
4187         * command.def: [GLOBAL_DEBUGGING] Drop the #if.
4188
4189         * compute.c: [GLOBAL_DEBUGGING] (cmd_evaluate) Drop the #if.
4190
4191 Sat Dec 27 19:34:40 2003  Ben Pfaff  <blp@gnu.org>
4192
4193         * apply-dict.c: (cmd_apply_dictionary) Replace a ghastly switch
4194         statement by a simple if test.
4195
4196         * dfm.c: (dfm_get_record) Add assertion.
4197
4198 Sat Dec 27 17:51:26 2003  Ben Pfaff  <blp@gnu.org>
4199
4200         For each file x.c, move #include "x.h" to the very top of the
4201         include list, to catch x.h failing to include the proper headers.
4202
4203 Sat Dec 27 17:50:19 2003  Ben Pfaff  <blp@gnu.org>
4204
4205         * algorithm.c: (find) New function.
4206         (remove_equal) New function.
4207         (set_difference) New function.
4208         (adjacent_find_equal) New function.
4209         [TEST_UNIQUE] Removed test case.
4210         (copy_if) Find end test.
4211
4212 Sat Dec 27 17:42:45 2003  Ben Pfaff  <blp@gnu.org>
4213
4214         * dictionary.c: (dict_get_case_weight) New convenience function.
4215
4216         * aggregate.c: (accumulate_aggregate_info) Use
4217         dict_get_case_weight().
4218
4219         * frequencies.q: (calc_general) Ditto.
4220         (calc_integer) Ditto.
4221         (calc) Ditto.
4222
4223         * t-test.q: (groups_calc) Ditto.
4224         (z_calc) Ditto.
4225
4226 Sat Dec 27 17:29:45 2003  Ben Pfaff  <blp@gnu.org>
4227
4228         * glob.c: (global var default_dict) Change from `struct
4229         dictionary' to `struct dictionary *'.  All references changed.
4230         (init_glob) Initialize default_dict with dict_create().
4231
4232 Sat Dec 27 17:06:06 2003  Ben Pfaff  <blp@gnu.org>
4233
4234         struct dictionary now made opaque.  All related functions:
4235
4236         * get.c: (rename_variables) Removed.
4237         (dict_delete_run) Removed.
4238         
4239         * temporary.c: (copy_variable) Removed.
4240         (new_dictionary) Removed.
4241         (save_dictionary) Removed.
4242         (restore_dictionary) Removed.
4243         (free_dictionary) Removed.
4244
4245         * vars-atr.c: (clear_default_dict) Removed.
4246         (find_variable) Removed.
4247         (find_dict_variable) Removed.
4248         (create_variable) Removed.
4249         (delete_variable) Removed.
4250         (common_init_stuff) Removed.
4251         (init_variable) Removed.  Updating of inp_init moved into
4252         cmd_end_input_program().
4253         (replace_variable) Removed.
4254         (rename_variable) Removed.
4255         (clear_variable) Removed.
4256         (dup_variable) Removed.
4257
4258         * vars-prs.c: (is_varname) Removed.
4259         (is_dict_varname) Removed.
4260         (fill_all_vars) Removed.
4261
4262         * vector.c: (find_vector) Removed.
4263
4264         * weight.c: (stop_weighting) Removed.
4265
4266         * dictionary.c: New file.
4267         (dict_create) New, replaces new_dictionary().
4268         (dict_clone) New, replaces save_dictionary() and
4269         restore_dictionary().
4270         (dict_clear) New, replaces clear_default_dict().
4271         (dict_destroy) New, replaces free_dictionary().
4272         (dict_get_var_cnt) New function, replaces references to
4273         dict->nvar.
4274         (dict_get_var) New function, replaces references to dict->var[i].
4275         (dict_get_vars) New function, replaces fill_all_vars().
4276         (dict_create_var) New, replaces create_variable().  Interface
4277         drops `type' parameter, using a zero `width' to designate numeric.
4278         (dict_clone_var) New, replaces dup_variable().
4279         (dict_rename_var) New, replaces rename_variable().
4280         (dict_lookup_var) New, replaces find_variable(),
4281         find_dict_variable(), is_varname().
4282         (dict_contains_var) New function.
4283         (compare_variable_dblptrs) New function.
4284         (dict_delete_var) New function, replaces clear_variable().
4285         (dict_delete_vars) New function, replaces dict_delete_run().
4286         (dict_reorder_vars) New function.
4287         (dict_rename_vars) New function, replaces rename_variables().
4288         (dict_get_weight) New function, replaces reading dict->weight_var.
4289         (dict_set_weight) New function, replaces writing dict->weight_var
4290         or calling stop_weight(dict).
4291         (dict_get_filter) New function, replaces reading dict->filter_var.
4292         (dict_set_filter) New function, replaces writing dict->filter_var.
4293         (dict_get_case_limit) New function, replaces reading dict->N.
4294         (dict_set_case_limit) New function, replaces writing dict->N.
4295         (dict_get_value_cnt) New function, replaces reading dict->nval.
4296         (dict_compact_values) New function, replaces a loop that was
4297         replicated in several places.
4298         (dict_get_split_vars) New function, replaces reading dict->splits.
4299         (dict_get_split_cnt) New function, replaces reading
4300         dict->n_splits.
4301         (dict_set_split_vars) New function, replaces writing dict->splits.
4302         (dict_get_label) New function, replaces reading dict->label.
4303         (dict_set_label) New function, replaces writing dict->label.
4304         (dict_get_documents) New function, replaces reading
4305         dict->documents.
4306         (dict_set_documents) New function, replaces writing
4307         dict->documents.
4308         
4309         All references to above functions updated.
4310         
4311         * aggregate.c: (cmd_aggregate) Copy file label and documents from
4312         old dictionary to new by hand, because dict_create() can't do it
4313         itself.  Use dict_set_documents(), dict_set_split_vars().
4314
4315         * temporary.c: (cancel_temporary) Also set temp_dict to NULL after
4316         calling dict_destroy().
4317
4318         * data-list.c: (dls_var_spec) Remove `type' member, replace by
4319         `width'.
4320         (fixed_parse_compatible) Some slightly nontrivial changes for
4321         dict_create_var().
4322         (dump_fmt_list) Ditto.
4323         (parse_free) Ditto.
4324
4325         * file-type.c: (create_col_var) Ditto.
4326
4327         * get.c: (cmd_get) Use dict_compact_values() instead of a loop.
4328         (trim_dictionary) Use dict_delete_vars(), dict_reorder_vars().
4329         (rename_variables) Use dict_rename_vars().
4330         (mtf_merge_dictionary) Use dict_get_documents(),
4331         dict_set_documents(), dict_compact_values().
4332
4333         * pfm-read.c: (read_variables) Deal with changes to weighting.
4334
4335         * q2c.c: (dump_parser) Use dict_lookup_var() instead of
4336         is_varname() in output code.
4337
4338         * sfm-read.c: (read_header) Use dict_create(), dict_set_label(),
4339         other dictionary functions.
4340
4341         * title.c: (add_document_line) Use dict_get_documents(),
4342         dict_set_documents().
4343
4344         * vars-atr.c: (discard_variables) Use dict_clear(default_dict),
4345         reset default_handle by hand.  dict_clear() will clear vectors so
4346         there's no need for that by hand.
4347
4348         * vfm.c: (close_active_file) Move call to finish_compaction()
4349         earlier, so that we can do the compaction as a single step using
4350         dict_compact_values().  Use dict_clear_vectors().
4351         (finish_compaction) Use dict_delete_var(), dict_compact_values().
4352                 
4353         Some functions don't have replacements:
4354
4355         * vars-atr.c: (force_create_variable) Removed.  All references
4356         updated to dict_create_var() followed by an assertion.
4357         (force_dup_variable) Removed.  All references updated to
4358         dict_clone_var() followed by an assertion.
4359         
4360         * weight.c: (update_weighting) Removed.  No longer necessary, so
4361         all references removed.
4362
4363 Sat Dec 27 16:43:01 2003  Ben Pfaff  <blp@gnu.org>
4364
4365         Clean up AGGREGATE.
4366         
4367         * aggregate.c: Eliminate separation of weighted and unweighted
4368         case.  It made the code too obscure and I doubt it was actually
4369         faster.  Instead, all code uses the "weighted" code, because
4370         that's a generalization of the "unweighted" code.
4371         (FWEIGHT) Removed.
4372         (FOPTIONS) Ditto.
4373         (parse_aggregate_functions) No need to set FWEIGHT.
4374         (accumulate_aggregate_info) Get rid of FWEIGHT cases.
4375         (dump_aggregate_info) Ditto.
4376         (initialize_aggregate_info) No need for special plain_function
4377         that gets rid of FWEIGHT option.
4378
4379         * aggregate.c: Get rid of approximations.
4380         (accumulate_aggregate_info) Don't use approx_gt(), approx_lt(),
4381         approx_in_range().
4382         (aggregate_single_case) Don't use approx_ne().
4383
4384 Sat Dec 27 16:19:36 2003  Ben Pfaff  <blp@gnu.org>
4385
4386         * ascii.c (ascii_line_width): Dead code, removed.
4387
4388         * postscript.c (ps_line_width): Ditto.
4389
4390         * q2c.c (xrealloc): Ditto.
4391
4392         * count.c (internal_cmd_count): Ditto.
4393
4394         * means.q (validate_dependent_endpoint): Ditto.
4395
4396         * set.q: (cmd_gset) Ditto.
4397
4398         * weight.c: [0] (weight_trns_proc) Ditto.
4399
4400 Sat Dec 27 16:18:16 2003  Ben Pfaff  <blp@gnu.org>
4401
4402         Make the code -Wmissing-prototypes clean.
4403
4404         * Makefile.am (version.c): Add #include "version.h".
4405         
4406         * ascii.c: (ascii_open_global) Make static.
4407         (ascii_close_page) Ditto.
4408         (ascii_font_sizes) Ditto.
4409         (ascii_postopen_driver) Ditto.
4410         (ascii_close_driver) Ditto.
4411         (ascii_option) Ditto.
4412         (ascii_open_page) Ditto.
4413         (ascii_line_horz) Ditto.
4414         (ascii_line_vert) Ditto.
4415         (ascii_line_intersection) Ditto.
4416         (ascii_box) Ditto.
4417         (ascii_polyline_begin) Ditto.
4418         (ascii_polyline_point) Ditto.
4419         (ascii_polyline_end) Ditto.
4420         (ascii_text_set_font_by_name) Ditto.
4421         (ascii_text_set_font_by_position) Ditto.
4422         (ascii_text_set_font_by_family) Ditto.
4423         (ascii_text_get_font_name) Ditto.
4424         (ascii_text_get_font_family) Ditto.
4425         (ascii_text_set_size) Ditto.
4426         (ascii_text_get_size) Ditto.
4427         (ascii_text_metrics) Ditto.
4428         (ascii_text_draw) Ditto.
4429         (ascii_close_page) Ditto.
4430
4431         * cmdline.h: New header for parse_command_line().  Used where
4432         needed.
4433
4434         * command.c: Move prototypes for cmd_*() functions to command.h.
4435
4436         * command.h: Prototypes for cmd_*() functions moved here from
4437         command.c.
4438
4439         * crosstabs.q: (gamma_int) Ditto.
4440
4441         * file-handle.h: Add fh_init_files() prototype.
4442         
4443         * getline.c: (welcome) Ditto.
4444
4445         * glob.h: New header for init_glob().  Used where appropriate.
4446
4447         * hash.c: (comparison_helper) Ditto.
4448
4449         * html.c: (html_open_global) Ditto.
4450         (html_close_global) Ditto.
4451         (html_preopen_driver) Ditto.
4452         (html_postopen_driver) Ditto.
4453         (html_close_driver) Ditto.
4454         (html_option) Ditto.
4455         (html_open_page) Ditto.
4456         (html_close_page) Ditto.
4457         (html_submit) Ditto.
4458
4459         * inpt-pgm.c: (input_program_source_read) Ditto.
4460
4461         * output.c: (find_defn_value) Ditto.
4462         (destroy_list) Ditto.
4463
4464         * pfm-read.c: (read_int) Ditto.
4465
4466         * postscript.c: (ps_open_global) Ditto.
4467         (ps_close_global) Ditto.
4468         (ps_font_sizes) Ditto.
4469         (ps_preopen_driver) Ditto.
4470         (ps_postopen_driver) Ditto.
4471         (ps_close_driver) Ditto.
4472         (ps_option) Ditto.
4473         (ps_open_page) Ditto.
4474         (ps_close_page) Ditto.
4475         (ps_line_horz) Ditto.
4476         (ps_line_vert) Ditto.
4477         (ps_line_intersection) Ditto.
4478         (ps_box) Ditto.
4479         (ps_polyline_begin) Ditto.
4480         (ps_polyline_point) Ditto.
4481         (ps_polyline_end) Ditto.
4482         (ps_text_set_font_by_name) Ditto.
4483         (ps_text_set_font_by_position) Ditto.
4484         (ps_text_set_font_family) Ditto.
4485         (ps_text_get_font_name) Ditto.
4486         (ps_text_get_font_family) Ditto.
4487         (ps_text_set_size) Ditto.
4488         (ps_text_get_size) Ditto.
4489         (ps_text_metrics) Ditto.
4490         (ps_text_draw) Ditto.
4491
4492         * q2c.c: (finish_up) Ditto.
4493         (xmalloc) Ditto.
4494         (xstrdup) Ditto.
4495         (get_buffer) Ditto.
4496         (st_lower) Ditto.
4497         (st_upper) Ditto.
4498         (skip_ws) Ditto.
4499         (get_line) Ditto.
4500         (add_symbol) Ditto.
4501         (find_symbol) Ditto.
4502         (lex_get) Ditto.
4503         (force_id) Ditto.
4504         (force_string) Ditto.
4505         (match_id) Ditto.
4506         (match_token) Ditto.
4507         (skip_token) Ditto.
4508         (parse) Ditto.
4509         (parse_setting) Ditto.
4510         (parse_specifier) Ditto.
4511         (parse_specifiers) Ditto.
4512         (parse_subcommand) Ditto.
4513         (dump_specifier_vars) Ditto.
4514         (is_keyword) Ditto.
4515         (make_identifier) Ditto.
4516         (dump_declarations) Ditto.
4517         (dump_specifier_init) Ditto.
4518         (dump_vars_init) Ditto.
4519         (make_match) Ditto.
4520         (dump_specifier_parse) Ditto.
4521         (dump_subcommand) Ditto.
4522         (dump_parser) Ditto.
4523         (dump_header) Ditto.
4524         (dump_free) Ditto.
4525         (recognize_directive) Ditto.
4526
4527         * recode.c: (string_to_long) Ditto.
4528
4529         * repeat.c: (find_DO_REPEAT_substitution) Ditto.
4530
4531         * repeat.h: New header for perform_DO_REPEAT_substitutions, used
4532         where appropriate.
4533
4534         * sort.c: (sort_stream_read) Ditto.
4535         (sort_stream_mode) Ditto.
4536         
4537 Fri Dec 19 23:35:04 2003  Ben Pfaff  <blp@gnu.org>
4538
4539         * algorithm.c (binary_search): Fix comparison.
4540
4541 Fri Dec 19 23:27:45 2003  Ben Pfaff  <blp@gnu.org>
4542
4543         * algorithm.c: (binary_search) Fix assertion.
4544
4545 Fri Dec 19 21:31:48 2003  Ben Pfaff  <blp@gnu.org>
4546
4547         * sysfile-info.c: (compare_vectors_by_name) Rewrite.
4548
4549 Fri Dec 19 21:30:24 2003  Ben Pfaff  <blp@gnu.org>
4550
4551         * sort.c: (compare_case_lists) Rewrite.
4552
4553 Fri Dec 19 16:44:22 2003  Ben Pfaff  <blp@gnu.org>
4554
4555         * quicksort.c: Removed (not used).
4556
4557         * quicksort.h: Removed (not used).
4558
4559         * sort.c: Removed blp_quicksort() prototype.
4560
4561 Fri Dec 19 16:42:13 2003  Ben Pfaff  <blp@gnu.org>
4562
4563         * postscript.c: (int_2_compare) Rewrite.
4564         (compare_line) Rewrite.
4565
4566 Fri Dec 19 16:38:35 2003  Ben Pfaff  <blp@gnu.org>
4567
4568         * matrix-data.c (compare_factors) Use lexicographical_compare()
4569         algorithm.
4570         (compare_doubles) New function.
4571         
4572         * algorithm.c: (lexicographical_compare) New algorithm.
4573
4574 Fri Dec 19 16:23:45 2003  Ben Pfaff  <blp@gnu.org>
4575
4576         * matrix-data.c (compare_variables_by_mxd_vartype): Rewrite.
4577
4578 Fri Dec 19 15:54:45 2003  Ben Pfaff  <blp@gnu.org>
4579
4580         * expr-prs.c: (cmp_func) Removed.
4581         (parse_function) Use binary_search() algorithm.
4582         (compare_functions) New function.
4583         (init_func_tab) Use sort() algorithm.
4584
4585         * algorithm.c: (binary_search) New algorithm.
4586
4587 Fri Dec 19 15:50:45 2003  Ben Pfaff  <blp@gnu.org>
4588
4589         * descript.q: (display) Use sort() algorithm instead of qsort().
4590         (compare_func) Removed.
4591         (descriptives_compare_variables) New function.
4592
4593 Fri Dec 19 15:08:38 2003  Ben Pfaff  <blp@gnu.org>
4594
4595         Get rid of AVL trees.  Hashes are more appropriate for everything
4596         PSPP does.
4597
4598         * Makefile.am: (pspp_SOURCES) Remove avl.c, avl.h.
4599         
4600         * avl.c: Removed.
4601
4602         * avl.h: Removed.
4603
4604 Fri Dec 19 14:33:31 2003  Ben Pfaff  <blp@gnu.org>
4605
4606         Much code can be clarified by using C++ STL-like algorithms.  Not
4607         all uses of these algorithms are listed below, only the ones where
4608         the change to an algorithm was the only change of interest.
4609         
4610         * Makefile.am: (pspp_SOURCES) Add algorithm.c, algorithm.h.
4611         
4612         * algorithm.c: New file.
4613
4614         * algorithm.h: New file.
4615
4616         * modify-vars.c: (static var forward) Removed.
4617         (static var positional) Removed.
4618         (compare_variables) Removed.
4619         (struct ordering) New.
4620         (cmd_modify_vars) Use sort() algorithm.
4621         (compare_variables_given_ordering) New function.
4622         (rearrange_dict) Use sort() algorithm.
4623
4624         * sysfile-info.c: (cmd_display) Use sort() algorithm.
4625         (cmp_var_by_name) Removed.
4626
4627 Fri Dec 19 14:26:17 2003  Ben Pfaff  <blp@gnu.org>
4628
4629         Make file handles use a hash table.
4630         
4631         * file-handle.q: (files) Change to hash table, make static.
4632         (cmd_file_handle) Use hash table functions.
4633         (fh_get_handle_by_filename) Ditto.
4634         (fh_get_handle_by_name) Ditto.
4635         (hash_file_handle) New function.
4636         (cmp_file_handle) Rewrite.
4637         (fh_init_files) Use hash table functions.
4638
4639 Fri Dec 19 14:24:38 2003  Ben Pfaff  <blp@gnu.org>
4640
4641         Clean up FREQUENCIES.
4642         
4643         * Makefile.am: (pspp_SOURCES) Remove frequencies.g.
4644
4645         * frequencies.q: Remove a lot of old #if'd out code at the end.
4646         (internal_cmd_frequencies) Use calc() instead of calc_no_weight()
4647         or calc_weight().  Initialize percentile_values.
4648         (calc) New function based on calc_weight() from frequencies.g.
4649         (precalc) Use hash functions.
4650         (static var comparison_func) Removed.
4651         (static var comparison_param) Removed.
4652         (comparison_helper) Removed.
4653         (get_freq_comparator) New function.
4654         (not_missing) New function.
4655         (add_freq) Removed.
4656         (postprocess_freq_tab) Use hash table functions, algorithms,
4657         get_freq_comparator().  Rewrite.
4658         (cleanup_freq_tab) Rephrase.
4659         (add_percentile) Clean up spacing.
4660         (hash_value_numeric) New function.
4661         (hash_value_alpha) New function.
4662         (compare_value_numeric_a) Rewrite.
4663         (compare_value_alpha_a) Rewrite.
4664         (compare_value_numeric_d) Rewrite.
4665         (compare_value_alpha_d) Rewrite.
4666         (compare_freq_numeric_a) Rewrite.
4667         (compare_freq_alpha_a) Rewrite.
4668         (compare_freq_numeric_d) Rewrite.
4669         (compare_freq_alpha_d) Rewrite.
4670         (calc_stats) Clean up mode, percentiles, max.
4671         (dump_statistics) Clean up spacing.
4672         
4673         * frequencies.g: Removed.
4674
4675         * var.h: (struct freq_tab) Change `data' to hash table.
4676
4677 Fri Dec 19 14:15:46 2003  Ben Pfaff  <blp@gnu.org>
4678
4679         * file-handle.h: Remove declaration of global variable `files',
4680         which wasn't used anywhere.
4681
4682         * postscript.c: (add_encoding) Remove superfluous cast.
4683         (line) Ditto.
4684
4685         * sfm-read.c: [linux] (bswap_int32) Drop ntohl() non-portable
4686         version.
4687
4688         * temporary.c: [0] (display_tree) Removed.
4689
4690 Fri Dec 19 14:13:04 2003  Ben Pfaff  <blp@gnu.org>
4691
4692         Implement a new random number generator based on the alleged RC4
4693         algorithm.
4694
4695         * expr-evl.c: (expr_evaluate) Use rng_get_double_normal() instead
4696         of rand_normal().
4697
4698         * random.c: [!HAVE_GOOD_RANDOM] (real_rand) Removed.
4699         [!HAVE_GOOD_RANDOM] (real_srand) Removed.
4700         (macro k) Removed.
4701         (static var V[]) Removed.
4702         (static var Y) Removed.
4703         (static var X2) Removed.
4704         (setup_randomize) Removed.
4705         (shuffle) Removed.
4706         (rand_uniform) Removed.
4707         (rand_normal) Removed.
4708         (struct rng) New structure.
4709         (rng_create) New function.
4710         (rng_destroy) New function.
4711         (swap_byte) New static function.
4712         (rng_seed) New function.
4713         (rng_get_bytes) New function.
4714         (rng_get_int) New function.
4715         (rng_get_unsigned) New function.
4716         (rng_get_double) New function.
4717         (rng_get_double_normal) New function.
4718         (pspp_rng) New function.
4719
4720         * random.h: Sync up to random.c.
4721
4722         * sample.c: (struct sample_trns) Make `frac' unsigned and a
4723         fraction of UINT_MAX, not 65536.
4724         (cmd_sample) Use rng_get_unsigned(), rng_get_double(), UINT_MAX
4725         fraction.
4726
4727         * vfm.c: (open_active_file) No need to call setup_randomize() any
4728         longer.
4729
4730 Fri Dec 19 12:05:56 2003  Ben Pfaff  <blp@gnu.org>
4731
4732         Change dictionary name indexes to use hash tables instead of AVL
4733         trees.
4734
4735         * crosstabs.q: (free_var_dict) Use hash tables.
4736         (crs_custom_tables) Ditto.
4737         (calc_general) Ditto.
4738         (compare_table_entry) Rewrite.
4739         (enum_var_values) Reorder parameters.  All references updated.
4740         Rewrite.
4741
4742         * get.c: (rename_variable) Use hash tables.
4743         (mtf_merge_dictionary) Ditto.
4744
4745         * glob.c: (init_glob) Use hash tables.
4746         (cmp_variable) Removed.
4747
4748         * means.q: (mns_custom_tables) Use hash tables.
4749
4750         * modify-vars.c: (rearrange_dict) Use hash tables.
4751
4752         * rename-vars.c: (cmd_rename_variables) Use hash tables.
4753
4754         * sfm-read.c: (read_header) Use hash tables.
4755         (read_variables) Ditto.
4756
4757         * temporary.c: (new_dictionary) Use hash tables.
4758         (save_dictionary) Ditto.
4759         (restore_dictionary) Ditto.
4760
4761         * var.h: (struct dictionary) Change AVL tree `var_by_name' into
4762         hash table `name_tab'.
4763
4764         * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed.
4765         [DEBUGGING] (dump_var_tree) Removed.
4766         (find_variable) Use hash tables.
4767         (find_dict_variable) Ditto.
4768         (common_init_stuff) Ditto.
4769         (rename_variable) Ditto.
4770         (clear_variable) Ditto.  Also, remove debug code.
4771         (dup_variable) Use hash tables.
4772
4773         * vars-prs.c: (fill_all_vars) Use hash tables.
4774         (is_dict_varname) Ditto.
4775         (parse_dict_variable) Ditto.
4776         
4777 Fri Dec 19 11:46:23 2003  Ben Pfaff  <blp@gnu.org>
4778
4779         Change value labels to use hash tables instead of AVL trees, and
4780         change value labels into an ADT.
4781
4782         * Makefile.am: (pspp_SOURCES) Add value-labels.c, value-labels.h.
4783         
4784         * value-labels.c: New file.
4785
4786         * value-labels.h: New file.
4787
4788         * apply-dict.c: (cmd_apply_dictionary) Use value label ADT.
4789         Get rid of a stupid use of goto.
4790
4791         * autorecode.c: (compare_alpha_value) Rewrite.
4792         (hash_alpha_value) Ditto.
4793         (compare_numeric_value) Rewrite.
4794         (hash_numeric_value) Ditto.
4795
4796         * frequencies.q: (dump_full) Use value label ADT.
4797
4798         * pfm-read.c: (read_value_label) Use value label ADT.
4799
4800         * pfm-write.c: (write_value_labels) Use value label ADT.
4801
4802         * sfm-read.c: (read_variables) Use value label ADT.
4803         (read_value_labels) Rewrite.
4804
4805         * sfm-write.c: (write_value_labels) Rewrite.
4806
4807         * sysfile-info.c: (cmd_sysfile_info) Use value label ADT.
4808         (display_variables) Ditto.
4809         (describe_variable) Ditto.
4810
4811         * t-test.q: (print_t_groups) Use value label ADT.
4812
4813         * temporary.c: (copy_variable) Use value label ADT.
4814         (free_dictionary) Ditto.
4815
4816         * val-labs.c: (verify_val_labs) Use value label ADT.
4817         (get_label) Ditto.
4818         (debug_print) Ditto.
4819         (val_lab_cmp) Removed.
4820         (inc_ref_count) Removed.
4821         (copy_value_labels) Removed.
4822
4823         * var.h: (struct value_label) Removed.
4824         (struct variable) Change AVL tree `val_lab' into hash table
4825         `val_labs'.
4826
4827         * vars-atr.c: (init_variable) Use value label ADT.
4828         (clear_variable) Ditto.
4829         (free_value_label) Removed.
4830         (free_val_lab) Removed.
4831         (get_val_lab) Removed.
4832         (compare_variables) New function.
4833         (hash_variable) New function.
4834
4835         * vfm.c: (dump_splits) Use value label ADT.
4836
4837 Fri Dec 19 11:18:11 2003  Ben Pfaff  <blp@gnu.org>
4838
4839         Add to the hash table interface.
4840
4841         * hash.c: (hsh_hash_bytes) Add assertion.
4842         (hsh_hash_string) Ditto.
4843         (hsh_clear) Ditto.
4844         (hsh_rehash) Ditto.
4845         (hsh_probe) Ditto.
4846         (hsh_create) Ditto.  Also make minimum `size'.
4847         (hsh_destroy) Rephrase.
4848         (sort_nulls_last) Removed.
4849         (not_null) New function.
4850         (hsh_data) Ditto.
4851         (comparison_helper) Ditto.
4852         (hsh_sort) Rewritten.
4853         (hsh_data_copy) New function.
4854         (hsh_sort_copy) Ditto.
4855         (hsh_insert) Ditto.
4856         (hsh_replace) Ditto.
4857         (hsh_hash_double) Ditto.
4858         (hsh_delete) Fix stupid bug.
4859         
4860 Thu Dec 18 12:27:03 WAST 2003 John Darrington <john@darrington.wattle.id.au>
4861         * added a calculation of the mode to FREQUENCIES
4862
4863 Wed Dec 17 12:53:01 WAST 2003 John Darrington <john@darrington.wattle.id.au>
4864
4865         * moved (un)defs of DEBUGGING to config.h
4866
4867 Mon Dec 15 21:35:59 2003  Ben Pfaff  <blp@gnu.org>
4868
4869         * groff-font.c: (add_kern) Fix indentation.
4870         (add_kern) Use & instead of % to take power-of-2 modulus.
4871         (font_get_kern_adjust) Likewise.
4872
4873 Fri Dec 12 23:54:37 2003  Ben Pfaff  <blp@gnu.org>
4874
4875         * autorecode.c: (recode) Replace stupid use of memcpy() by
4876         memberwise copy.
4877         (hash_alpha_value) Use hsh_hash_bytes().  Get rid of nasty casts.
4878         (hash_numeric_value) Ditto.
4879         (autorecode_proc_func) pool_strdup() was wrong here because the
4880         source string was not null-terminated.  Use new pool_strndup()
4881         instead.
4882
4883         * crosstabs.q: (enum_var_values) Remove superfluous and bizarre
4884         use of hsh_iterator_init().
4885
4886         * data-in.c: (parse_N) Initialize i->v->f.
4887
4888         * flip.c: (cmd_flip) Use memmove(), not memcpy(), to copy
4889         overlapping arrays.
4890
4891         * groff-font.c: Use power-of-2 hash table sizes, not prime.
4892         (groff_read_font) Don't call hsh_next_prime().  Don't call
4893         fclose(NULL).
4894         (static var hash) Remove `size_p', `max_used' members.
4895         (font_char_name_to_index) Don't call hsh_next_prime().  Use
4896         hsh_hash_string() instead of hashpjw(), & instead of %.
4897         (default_font) Don't call hsh_next_prime().
4898
4899         * pool.c: (pool_strndup) New function.
4900         (pool_strdup) Reimplement in terms of pool_strndup.
4901
4902         * postscript.c: (hash_font_entry) Use hsh_hash_string().  Get rid
4903         of nasty casts.
4904         (hash_ps_encoding) Use hsh_hash_string().
4905         (hash_ps_combo) Use hsh_hash_string(), hsh_hash_int().
4906         (hash_filename2font) Use hsh_hash_string().
4907
4908         * som.c: Add #include <stdlib.h>.
4909
4910         * tab.c: (tab_destroy) Don't set t->container after freeing `t'
4911         (by destroying its pool).
4912         
4913 Fri Dec 12 23:18:59 2003  Ben Pfaff  <blp@gnu.org>
4914
4915         Miscellaneous hash table code cleanup:
4916         
4917         * hash.h: (struct hsh_table) Moved into hash.c.
4918         (hsh_count) Ditto, and transformed into function.
4919         (hsh_compare_func) New typedef, used for defining otherwise-long
4920         function types here and in hash.c
4921         (hsh_hash_func) Ditto.
4922         (hsh_free_func) Ditto.
4923         
4924         * hash.c: (struct hsh_table) Renamed `n' to `used', `m' to `size',
4925         `table' to `entries'.  Removed `mp'.  All references updated.
4926         (hsh_clear) Don't shrink entries array; if the hash was this big
4927         once, it probably will be again.
4928         (hsh_rehash) Made static.
4929         (force_hsh_insert) Renamed hsh_force_insert.
4930         (force_hsh_find) Renamed hsh_force_find.
4931
4932         Made hash table sizes powers of 2, because that's fine with any
4933         reasonable hash function and because taking a power-of-2 modulus
4934         is faster than any other:
4935         
4936         (hsh_prime_tab) Removed;
4937         (hsh_next_prime) Ditto.
4938         (next_power_of_2) New function.
4939         (hsh_create) Use next_power_of_2.
4940         (hsh_rehash) Use & instead of %.
4941
4942         Cleaned up hsh_sort:
4943         
4944         (internal_comparison_fn) Removed.
4945         (sort_nulls_last) New function.
4946         (hsh_sort) Removed second parameter, switched to using the new
4947         quicksort() function from quicksort.h to avoid using nasty need
4948         for static variables with qsort().  All references updated.
4949
4950         Changed the hash functions offered, because there are better hash
4951         functions than the ones we had, and cleaned up the names to boot:
4952         
4953         * hash.c: (hashpjw_d) Removed.
4954         (hashpjw) Ditto.
4955         (hsh_hash_bytes) New function.
4956         (hsh_hash_string) New function.
4957         (hsh_hash_int) New function.
4958
4959         Improved the hash table iteration interface:
4960         
4961         * hash.h: (hsh_iterator_init) Removed.
4962         (struct hsh_iterator) Removed `init' member, change `next' to
4963         size_t.
4964
4965         * hash.c: (hsh_foreach) Removed.  All references updated to use
4966         hsh_first/hsh_next instead.
4967         (hsh_first) New function.  Notably, unlike hsh_foreach() it does
4968         not treat a null pointer as an empty hash table.
4969         (hsh_next) New function.
4970
4971         Made deletion possible, though slow:
4972
4973         * hash.c: (locate_matching_entry) New function.
4974         (hsh_find) Use locate_matching_entry().
4975         (hsh_delete) New function also using locate_matching_entry().
4976         (hsh_force_delete) New function.
4977
4978 Fri Dec 12 23:16:10 2003  Ben Pfaff  <blp@gnu.org>
4979
4980         * quicksort.c: New file implementing a sort routine with a
4981         interface better than qsort() because it passes a user-provided
4982         parameter to the sort routine.
4983
4984         * Makefile.am: Add quicksort.c, quicksort.h.
4985
4986 Fri Dec 12 13:31:58 2003  Ben Pfaff  <blp@gnu.org>
4987
4988         * All source files: Get rid of nasty special cases for Checker,
4989         which is pretty obsolete now.
4990
4991 Thu Dec 11 21:38:24 WST 2003 John Darrington <john@darrington.wattle.id.au>
4992
4993         * Fixed a bug apparent when using the FREQUENCIES command with the
4994         html driver.  The html driver was incorrectly trying to display 
4995         empty cells.
4996
4997 Sun Jan  2 21:40:13 2000  Ben Pfaff  <blp@gnu.org>
4998
4999         * Makefile.am: Reorganized.  Put locale dir in version.c instead
5000         of passing it to each compile command.  Only put local gmp libs in
5001         LD_ADD if not installed on system.  Remove `boast' target.
5002
5003         * All source files: struct and union typedefs eliminated.
5004         `sizeof type' replaced by `sizeof object' where practical.  Moved
5005         `unused' qualifiers from start to end of declarations for gcc
5006         2.7.2 compatibility.  Change `while (1)' to `for (;;)'.  Made
5007         assertions on pointers strictly compliant.  Removed _ prefixes on
5008         some function parameter names.
5009
5010         * alloc.c: New source file, containing these external linkage
5011         functions removed from common.c: xmalloc, xcalloc, xrealloc,
5012         xstrdup.
5013
5014         * arena.c: Removed.
5015         
5016         * arena.h: Removed.
5017
5018         * ascii.c: Migrated from arenas to pools.
5019         (struct ascii_driver_ext) ops[], box[], fonts[] changed from
5020         c_string to len_string.  All references changed.
5021         (ascii_option) Signature changed to comply to new output.c
5022         interface.
5023         (count_fancy_chars) Removed.
5024         (delineate) Removed support for rich text.
5025         (ascii_text_metrics) Ditto.
5026         (text_draw) Ditto.
5027         (output_shorts) Change `box', `off', `on' from c_string to
5028         len_string.  Change `remaining' from int to size_t.
5029         (ascii_close_page) Make page numbering less haphazard.
5030
5031         * autorecode.c: Migrate from arenas to pools.
5032
5033         * avl.c: Migrate from arenas to pools.  Synch from libavl 1.4.0.
5034
5035         * bitvector.h: New file containing these macros from misc.h:
5036         SET_BIT, CLEAR_BIT, SET_BIT_TO, TEST_BIT, BIT_INDEX.
5037
5038         * command.c: (struct command) cmd1, cmd2, cmd3 members changed to
5039         word[3].  ncmd removed.
5040         (var empty_string) Removed.
5041         (var cmd_table) Declaration updated.
5042         (var cmdtab) Removed.
5043         (cmp_command) Removed.
5044         (split_words) Rewritten to use strtok_r().
5045         (init_cmd_parser) Renamed cmd_init().  Rewritten.
5046         (find_command) Removed.
5047         (FILE_TYPE_okay) Rewritten.
5048         (cmd_parse) Rewritten.  Semantics of the return value of command
5049         handlers has changed: they must now return one of the new CMD_*
5050         enumerals, rather than a magic value.  This meant that all
5051         commands had to be modified, and they were.
5052         (figure_out_command) New function.
5053
5054         * command.def: Add CORRELATIONS, PEARSON CORRELATIONS.  Add
5055         #defines for INIT, INPU, etc.
5056
5057         * command.h: New CMD_* enum series.
5058         (cur_proc) Make const char *, not char *.
5059         (cmd_init) Prototype.
5060         (cmd_parse) Ditto.
5061
5062         * common.c: Removed.
5063
5064         * common.h: Removed.
5065
5066         * correlations.q: New file.
5067
5068         * crosstabs.q: Migrate from arenas to pools.  Migrate to new-style
5069         q2c.
5070         (custom_tables) Renamed crs_custom_tables().
5071         (custom_variables) Renamed crs_custom_variables().
5072         (calc_integer) Add in some `const' qualifiers.
5073         (table_value_missing) Change from a_string to len_string.
5074         (float_M_suffix) Change from a_string to len_string.
5075
5076         * data-in.c: Rewritten.  All references to
5077         parse_string_as_format() changed to data_in().
5078
5079         * data-in.h: New file.
5080
5081         * data-list.c: Change DLS_* from #define's to enums.  Move from
5082         rpd_msg() to tmsg().
5083         (RPD_ERR) New #define.
5084         (do_reading) Change dfm_push_cust() to dfm_push(), pop_cust() to
5085         dfm_pop().
5086         (read_from_data_list_fixed) Change from old
5087         parse_string_as_format() to new data_in().
5088         (read_from_data_list_free) Ditto.
5089         (read_from_data_list_list) Ditto.
5090         (cmd_repeating_data) Modify approach to checking for end of
5091         command.
5092         (rpd_msg) Removed.
5093         (rpd_parse_record) Change from old parse_string_as_format() to new
5094         data_in().  Change from old convert_format_to_string() to new
5095         data_out().
5096         (read_one_set_of_repetitions) Change dfm_push_cust() to
5097         dfm_push(), pop_cust() to dfm_pop().
5098
5099         * data-out.c: Rewritten.  All references to
5100         convert_format_to_string() changed to data_out().
5101
5102         * descript.q: Migrate to new q2c.
5103         (cmd_descriptives) Removed.
5104         (internal_cmd_descriptives) Renamed cmd_descriptives ().
5105         (custom_variables) Renamed dsc_custom_variables().
5106
5107         * dfm.c: (struct dfm_fhuser_ext) `ln' removed.  All references
5108         removed.
5109         (open_file_r) Initialize h->where.line_number.  Migrate to new
5110         struct string.
5111         (open_file_w) Initialize h->where.line_number.
5112         (read_record) Change from ext->ln to h->where.line_number.
5113         Migrate to struct string.
5114         (dfm_put_record) Rephrased.
5115         (dfm_push_cust) Renamed dfm_push(), rewritten.
5116         (dfm_pop) New function.
5117
5118         * error.c: All references updated.
5119         (glob var error_count) Renamed err_err_count.
5120         (glob var warning_count) Renamed err_warning_count.
5121         (glob var error_already_flagged) Renamed err_already_flagged.
5122         (glob var verbosity) Renamed err_verbosity.
5123         (glob var cust_fn) Removed.
5124         (glob var cust_ln) Removed.
5125         (static var file_loc) New.
5126         (static var nfile_loc) New.
5127         (static var mfile_loc) New.
5128         (tmsg) New function.
5129         (push_cust) Removed.
5130         (pop_cust) Removed.
5131         (msg) Rewritten.
5132         (static var terminating) Removed.
5133         (failure) Renamed err_failure().
5134         (hcf) Renamed err_hcf().
5135         (err_push_file_locator) New function.
5136         (err_pop_file_locator) New function.
5137         (err_location) New function.
5138         (check_error_count) Renamed err_check_count().
5139         (vmsg) Renamed err_vmsg().  Interface changed.
5140         (verbose_msg) Removed.
5141         (err_cond_fail) New function.
5142         (error_break) Renamed err_break().
5143
5144         * error.h: All references updated.
5145         (enum MSG_CLASS_COUNT) Renamed ERR_CLASS_COUNT.
5146         (enum ERR_CLASS_MASK, ERR_VERBOSITY_SHIFT, ERR_VERBOSITY_MASK)
5147         New.
5148         (struct file_locator) New.
5149         (struct error) New.
5150         (macro verbose_msg) Removed.
5151         (macro cond_fail) Removed.
5152
5153         * expr-opt.c: (evaluate_tree) sizeof(char) == 1.
5154
5155         * expr-prs.c: Reorganized.  All references updated.
5156         (exprtypename) Renamed expr_type_name().
5157         (typename) Renamed type_name().
5158         (free_expression) Renamed expr_free().
5159         (parse_expression) Renamed expr_parse().  Uses new type_check()
5160         function.
5161         (init_functab) Renamed init_func_tab().
5162         (type_check) New function.
5163         (parse_or) Rewritten to use new allocate_nonterminal() and
5164         append_nonterminal_arg() functions.
5165         (parse_and) Ditto.
5166         (parse_not) Ditto.
5167         (parse_rel) Ditto.  Also simplified logic.
5168         (parse_add) Ditto.
5169         (parse_mul) Ditto.
5170         (parse_neg) Ditto.
5171         (parse_exp) Ditto.
5172         (SYSMIS_func) Ditto.
5173         (VALUE_func) Rephrased.
5174         (CONCAT_func) Fix memory leak by replacing free by free_node on
5175         lossage.
5176         (generic_str_func) Ditto.
5177         (parse_function) Ditto.  Also rephrasings.  Uses bsearch() to find
5178         function.
5179         (allocate_nonterminal) New function.
5180         (append_nonterminal_arg) New function.
5181         (static func_tab[]) Now at file level.
5182         (cmp_func) Moved.
5183         (init_func_tab) Moved.  Now just uses qsort() to sort func_tab[].
5184
5185         * expr.h: (enum series OP_*) Moved to exprP.h.
5186         (OP_* defines) Ditto.
5187         (struct op_desc) Ditto.
5188         (global ops[]) Ditto.
5189         (struct num_con_node) Ditto.
5190         (struct str_con_node) Ditto.
5191         (struct var_node) Ditto.
5192         (struct lag_node) Ditto.
5193         (struct casenum_node) Ditto.
5194         (struct nonterm_node) Ditto.
5195         (union any_node) Members renamed.
5196         (struct sys_node) Removed.
5197         (struct val_node) Removed.
5198         (operator typedef) Removed.
5199         (typedef exprtype) Removed.
5200         (enum series EX_*) Moved to exprP.h.
5201         (struct expression) Ditto.  Also renamed a lot of the members.
5202         (PXP_* defines) Changed to enums.
5203         (free_node prototype) Moved to exprP.h.
5204
5205         * file-handle.h: (struct file_handle) New member `where'.
5206
5207         * file-handle.q: Migrated to new q2c format.
5208         (prepend_current_directory) Removed (dead code).
5209         (cmd_file_handle) Incorporated all of internal_cmd_file_handle().
5210         (fh_get_handle_by_filename) Removed dead code.
5211         Set new `where' member.
5212
5213         * file-type.c: (file_type_source_read) References to
5214         parse_string_as_format() changed to data_in().
5215         dfm_push_cust()/pop_cust() changed to dfm_push()/dfm_pop().
5216
5217         * filename.c: All references updated.
5218         (init_filename) Renamed fn_init().
5219         (expand_line) Removed.
5220         (macro EXPAND_LINE) Removed.
5221         (interp_vars) Renamed fn_interp_vars().  Now uses st_*() instead
5222         of custom functions.
5223         (gnu_getcwd) Renamed fn_get_cwd(), rewritten.
5224         (tilde_expand) Renamed fn_tilde_expand(), uses ds_*().
5225         (normalize_filename) Renamed fn_normalize().
5226         (search_path) Renamed fn_search_path(), rewritten.
5227         (prepend_dir) Renamed fn_prepend_dir().
5228         (blp_getenv) Renamed fn_getenv().
5229         (blp_dirname) Renamed fn_dirname().
5230         (fn_basename) New function, not used.
5231         (absolute_filename_p) Renamed fn_absolute_p().
5232         (is_special_filename) Renamed fn_special_p().
5233         (file_exists) Renamed fn_exists_p().
5234         (readlink_malloc) Renamed fn_readlink().
5235         (getenv_default) Renamed fn_getenv_default().
5236         (open_file) Renamed fn_open().
5237         (close_file) Renamed fn_close().
5238         (open_file_ext) Renamed fn_open_ext().
5239         (close_file_ext) Renamed fn_close_ext().
5240
5241         * font.h: Migrate from arenas to pools.
5242
5243         * format.c: (parse_format_specifier_name) Deal with ds_* strings.
5244
5245         * frequencies.g: Migrate from arenas to pools.
5246
5247         * frequencies.q: Migrate to new q2c version.  Migrate from arenas
5248         to pools.
5249
5250         * getline.c: All references updated.
5251         (global getl_buf) Changed from char * to struct string.
5252         (static getl_include_path) Ditto.
5253         (global getl_buf_len) Removed.
5254         (global getl_buf_size) Removed.
5255         (getl_include_path) Deal with new getl_buf, getl_include_path.
5256         (getl_uninitialize) New function.
5257         (getl_get_current_directory) Rewritten.
5258         (getl_clear_include_path) Rewritten.
5259         (getl_add_include_dir) Rewritten.
5260         (getl_add_file) Assertion fixed.
5261         (getl_add_virtual_file) Change initial value of `remaining_loops'
5262         from 2 to 1.
5263         (welcome) Rewritten.
5264         (handle_line_buffer) Make static.  Change logic to make
5265         getl_add_virtual_file() change sensible.  Use ds_*() strings.
5266         (getl_read_line) Use ds_*() strings.  Implement SET ECHO.
5267         (getl_close_file) Moved.
5268         (getl_location) New function.
5269
5270         * getline.h: All references updated.
5271         (macro curln) Removed.
5272         (macro curfn) Removed.
5273         (macro am_interactive) Renamed getl_am_interactive.
5274         (macro am_reading_script) Renamed getl_reading_script.
5275
5276         * glob.c: (global fmt_parse_ignore_error) Removed.
5277         (init_glob) Use locale_dir not LOCALEDIR.  Use feholdexcept() on
5278         systems that support it (C99).  Turn off SET ECHO by default.  No
5279         necessary julcal initialization anymore.
5280
5281         * groff-font.c: Migrate from arenas to pools.
5282         (groff_read_font) Use err_push_file_locator().
5283         (groff_read_DESC) Ditto.
5284         (font_msg) Use tmsg().
5285
5286         * hash.c: (hsh_sort) Fix debug code.
5287         [GLOBAL_DEBUGGING] Include stdio.h.
5288
5289         * hash.h: (macro force_hsh_insert) Rephrase.
5290
5291         * heap.c: Rewritten.
5292         
5293         * heap.h: Rewritten.
5294
5295         * html.c: (html_option) Change from outp_value to struct string.
5296         (postopen) Change from curfn to getl_location().
5297         (escape_string) Remove rich-text code.  Signature changed.
5298         (output_tab_table) Switch from a_string to struct len_string.
5299         Remove rich text support.
5300
5301         * lexer.c: All references updated.  Largely rewritten.  Major
5302         changes listed below.  Removed tagged quote support.  Adapted to
5303         struct string tokstr.
5304         (global tokstr) Changed to struct string.
5305         (global tokstr_size) Removed.
5306         (global tokstr_len) Removed.
5307         (global tokid) New.
5308         (global tokint) Removed.
5309         (global toklongstr) Removed.
5310         (C* defines) Removed.
5311         (static tbl[]) Removed.
5312         (static id[]) Removed.
5313         (static une[]) Removed.
5314         (discard_line) Renamed lex_discard_line().
5315         (get_entire_line) Renamed lex_entire_line().
5316         (get_rest_of_line) Renamed lex_rest_of_line().
5317         (get_dotted_rest_of_line) Merged into lex_rest_of_line().
5318         (make_hexit) Removed.
5319         (syntax_error) Renamed lex_error().  Return value removed.
5320         (get_token_representation) Renamed lex_token_representation().
5321         (putback) Renamed lex_put_back().
5322         (putfwd) Renamed lex_put_forward().
5323         (convert_negative_to_dash) Renamed lex_negative_to_dash().
5324         (set_prog) Renamed lex_set_prog().
5325         (init_lex) Renamed lex_init().
5326         (reset_eof) Renamed lex_reset_eof().
5327         (lookahead) Renamed lex_look_ahead().
5328         (check_id) Rewritten.
5329         (yylex) Renamed lex_get(), rewritten.
5330         (lex_end_of_command) New function.  Many commands were rephrased
5331         using this.
5332         (lex_integer_p) New function.  Replaces compare of tokint against
5333         NOT_LONG.
5334         (lex_integer) New function.  Replaces tokint.
5335         (match_tok) Renamed lex_match().
5336         (match_id) Renamed lex_match_id().
5337         (match_int) Renamed lex_match_int().
5338         (force_match_id) Renamed lex_force_match_id(), added return value.
5339         (force_match) Renamed lex_force_match(), added return value.
5340         (force_string) Renamed lex_force_string(), added return value.
5341         (force_int) Renamed lex_force_int(), added return value.
5342         (lex_id_match_len) New function.
5343         (id_match) Renamed lex_id_match(), rewritten.
5344         (get_line) Renamed lex_get_line().
5345         (preprocess_line) Renamed lex_preprocess_line().
5346         (tokname) Renamed lex_token_name().
5347         (bin_value_func) Removed.
5348         (oct_value_func) Removed.
5349         (hex_value_func) Removed.
5350         (unexpected_eof) New function.
5351         (convert_numeric_string_to_char_string) New function.
5352         (parse_string) Rewritten, signature changed.
5353         (add_tokstr_char) Removed.
5354         (add_tokstr_unsigned) Removed.
5355         (add_tokstr_string) Removed.
5356         (parse_tagged_quote) Removed.
5357         (skip_comment) Renamed lex_skip_comment().
5358
5359         * lexer.h: All references updated.
5360         (macro is_id1) Renamed CHAR_IS_ID1.
5361         (macro is_idn) Renamed CHAR_IS_IDN.
5362         (token names ID, NUM, STRING, STOP, ... WITH, EXP) Renamed with
5363         prefix T_: T_ID, T_NUM, T_STRING, T_STOP, ... T_WITH, T_EXP.
5364         (macro get_token) Removed.
5365         (macro id_match) Removed.
5366         (macro force_match_id) Removed.
5367         (macro force_match) Removed.
5368         (macro force_string) Removed.
5369         (macro force_int) Removed.
5370         (macro force_num) Removed.
5371         (macro force_id) Removed.
5372
5373         * lexerP.h: Removed.
5374
5375         * list.q: Migrated to new q2c format.
5376         (write_line) Deal with struct len_string.
5377         (write_varname) Ditto.
5378         (write_fallback_headers) Ditto.
5379
5380         * magic.c: New file, incorporating the following global variables
5381         previously in other files: endian, second_lowest_value.  And both
5382         of those are conditional on #define's.
5383
5384         * magic.h: New file, incorporating the following global variable
5385         declarations: endian, second_lowest_value, and the following macro
5386         declarations: NOT_DOUBLE, NOT_LONG, NOT_INT.
5387
5388         * main.c: Added declarations of pgmname, finished, curdate,
5389         start_interactive.
5390         (main) Call new parse_script() function.
5391         (parse_script) New function.
5392         (execute_command) New function.
5393         (dump_token) Removed.
5394         (handle_error) New function.
5395
5396         * matrix.c: New file.
5397
5398         * matrix.h: New file.
5399
5400         * matrix-data.c: Migrated from arenas to pools.
5401         (mget_token) Change from parse_string_as_format() to data_in().
5402
5403         * means.q: Migrate to new q2c.
5404         (custom_tables) Renamed mns_custom_tables().
5405         (custom_crossbreak) Renamed mns_custom_crossbreak().
5406         (custom_variables) Renamed mns_custom_variables().
5407
5408         * mis-val.c: (static var width) Changed from `int' to `size_t'.
5409         (parse_varnames) Prototype.
5410         (parse_numeric) Rephrasings.
5411         (parse_alpha) Adapt to new struct string tokstr.
5412
5413         * misc.c: (intlog10) Rewritten.
5414         (spacing) Removed.
5415         (ansi_rand) Renamed real_rand(), moved into random.c.
5416         (ansi_srand) Renamed real_srand(), moved into random.c.
5417         (setup_randomize) Moved to random.c.
5418         (rand_uniform) Ditto.
5419         (rand_normal) Ditto.
5420         (rand_simple) Ditto.
5421         (get_config_line) Removed.
5422         (reverse) Removed (dead code).
5423
5424         * misc.h: (macro SET_BIT) Moved to bitvector.h.
5425         (macro CLEAR_BIT) Ditto.
5426         (macro TEST_BIT) Ditto.
5427         (macro SET_BIT_TO) Ditto.
5428         (macro BIT_INDEX) Ditto.
5429
5430         * output.c: (outp_read_devices) Move to err_push_file_locator()
5431         from push_cust().  Use struct string.
5432         (expand_op_tokstr) Removed.
5433         (static var op_tokstr) Changed to struct string.
5434         (static var op_tokstr_size) Removed.
5435         (tokener) Rephrasings.  Use struct string.
5436         (parse_options) Use struct string.
5437         (destroy_driver) Fix assertion.
5438         (outp_get_paper_size) Move to err_push_file_locator().
5439         [0] Removed dead code.
5440         (outp_string_width) Move to len_string.
5441
5442         * output.h: Comment fixes.
5443         (TAG_* enum series) Removed.
5444         (struct outp_value) Removed.
5445         (enum OUTP_T_FANCY) Removed.
5446         (struct outp_text) `s' changed from a_string to len_string.
5447         (struct outp_class) `option' change arg 3 from outp_value to
5448         struct string.
5449
5450         * pfm-read.c: (corrupt_msg) Rewritten.
5451
5452         * pfm-write.c: (bufwrite) Fix assertion.
5453
5454         * pool.c: New file, reference version.
5455
5456         * pool.h: New file, reference version.
5457
5458         * postscript.c: (ps_font_sizes) Fix assertion.
5459         (ps_option) Change arg 3 from outp_value to struct string.
5460         Adapt to struct string.
5461         (macro output_line) Removed.
5462         (macro add_string) Removed.
5463         (output_encodings) Adapted to struct string.  Moved to
5464         err_push_file_locator().
5465         (find_encoding_file) Fix assertion.
5466         (read_ps_encodings) Move to err_push_file_locator().
5467         (postopen) Use getl_location() instead of curfn.
5468         (out_text_plain) Move to len_string.
5469         (text) Ditto.  Remove rich text support.
5470
5471         * print.c: (cmd_print) Remove now-unneeded resource cleanup code.
5472         (cmd_print_eject) Ditto.
5473         (cmd_write) Ditto.
5474         (internal_cmd_print) Now cleans up after itself.  Uses
5475         fh_parse_file_handle() now.
5476         (cmd_print_space) Use PXP_NUMERIC to type-check.
5477
5478         * q2c.c: Overhauled.  Removed _("") i18n support.  All references
5479         updated.  All output functions updated to handle structures rather
5480         than local or static variables.  Adapt to new PSPP lex_*()
5481         functions.
5482         (macro _) Removed.
5483         (macro N_) Removed.
5484         (macro MAX_N_SBC) Removed.
5485         (global bare) Removed.
5486         (enum STRING) Renamed T_STRING.
5487         (enum ID) Renamed T_ID.
5488         (get_buffer) Buffer size increased.
5489         (strlower) Renamed st_lower(), rephrased.
5490         (strupper) Renamed st_upper(), rephrased.
5491         (skip_ws) New function.
5492         (get_line) Don't special-case any types of lines (like those
5493         beginning with ! or $, for instance).
5494         (get_token) Renamed lex_get().  Rephrased.
5495         (static var `prefix') New.
5496         (parse) New function.
5497         (parse_setting) Minor rephrasing.
5498         (dump_specifier_vars) Ditto.
5499         (make_identifier) Put null terminator on identifier, duh.
5500         (dump_vars) Renamed dump_declarations().  Never indent.  Never
5501         static.  Output changed entirely.
5502         (dump_specifier_init) Rephrase.
5503         (dump_vars_init) No index variable needed.  Other modifications.
5504         (dump_parser) Don't parse command name.  Do dump functions instead
5505         of just code fragments.
5506         (dump_free) Dump function instead of code fragment.
5507         (recognize_directive) New function.
5508         (main) Use recognize_directive().  Don't rely on magic $ line
5509         beginning: instead, parse comments.  Update list of headers.
5510
5511         * random.c: New file, containing the following functions:
5512         real_rand(), real_srand(), setup_randomize, shuffle, rand_uniform,
5513         rand_normal, rand_simple.
5514
5515         * random.h: New file.
5516
5517         * recode.c: (cmd_recode) Merge internal_cmd_recode() into this
5518         function.  `max_src_width', `max_dst_width' changed to size_t.
5519         (internal_cmd_recode) Removed.
5520         (parse_dest_spec) Merge similar cases.
5521         (parse_src_spec) Add assertion.
5522
5523         * repeat.c: (recognize_keyword) New function.
5524         (internal_cmd_do_repeat) Parse and handle PRINT keyword on END
5525         REPEAT.  Improve recognition of END REPEAT (use
5526         recognize_keyword()).  Move from curfn to getl_location().  Use
5527         struct string.
5528                 
5529         (perform_DO_REPEAT_substitutions) Adapt to struct string.
5530
5531         * set.q: Adapt to new q2c.
5532         (cmd_set) Range-check some values better.
5533         (custom_blanks) Renamed stc_custom_blanks().
5534         (custom_length) Renamed stc_custom_length().
5535         (custom_results) Renamed stc_custom_results().
5536         (custom_seed) Renamed stc_custom_seed().
5537         (custom_width) Renamed stc_custom_width().
5538         (custom_format) Renamed stc_custom_format().
5539         (custom_journal) Renamed stc_custom_journal().
5540         (custom_color) Renamed stc_custom_color().
5541         (custom_listing) Renamed stc_custom_listing().
5542         (custom_disk) Renamed stc_custom_disk().
5543         (custom_log) Renamed stc_custom_log().
5544         (custom_rcolor) Renamed stc_custom_rcolor().
5545         (custom_viewlength) Renamed stc_custom_viewlength().
5546         (custom_workdev) Renamed stc_custom_workdev().
5547
5548         * settings.h: Not necessary to include format.h any longer.
5549
5550         * sfm-read.h: (macro bswap_int32) Moved here from sfmP.h.
5551         (corrupt_msg) Rewritten.
5552
5553         * sort.c: Adapt to rewritten heap ADT.
5554
5555         * str.c: (aa_strcpy) Removed.
5556         (ab_strcpy) Removed.
5557         (ac_strcpy) Removed.
5558         (ba_strcpy) Removed.
5559         (bb_strcpy) Removed.
5560         (ca_strcpy) Removed.
5561         (aa_strdup) Removed.
5562         (aa_strdupcpy) Removed.
5563         (ba_strdup) Removed.
5564         (sa_strdup) Removed.
5565         (memrev) Renamed mm_reverse().
5566         (memrmem) Renamed mm_find_reverse().
5567         (cmp_str) Renamed st_compare_pad().
5568         (strmaxcpy) Removed.
5569         (strbarepadcpy) Renamed st_bare_pad_copy(), signature changed.
5570         (strbarepadlencpy) Renamed st_bare_pad_len_copy(), signature
5571         changed.
5572         (strpadcpy) Renamed st_pad_copy(), signature changed.
5573         (blpstrset) Removed.
5574         (ds_create) New function.
5575         (ds_init) New function.
5576         (ds_replace) New function.
5577         (ds_destroy) New function.
5578         (ds_clear) New function.
5579         (ds_extend) New function.
5580         (ds_shrink) New function.
5581         (ds_truncate) New function.
5582         (ds_length) New function.
5583         (ds_size) New function.
5584         (ds_value) New function.
5585         (ds_end) New function.
5586         (ds_concat) New function.
5587         (ds_concat_buffer) New function.
5588         (ds_printf) New function.
5589         (ds_putchar) New function.
5590         (ds_getline) New function.
5591         (ds_get_config_line) New function derived from the old
5592         misc.c:get_config_line().
5593         (ls_create) New function.
5594         (ls_create_buffer) New function.
5595         (ls_init) New function.
5596         (ls_shallow_copy) New function.
5597         (ls_destroy) New function.
5598         (ls_null) New function.
5599         (ls_null_p) New function.
5600         (ls_empty_p) New function.
5601         (ls_length) New function.
5602         (ls_value) New function.
5603         (ls_end) New function.
5604
5605         * str.h: Reformatted.
5606         (struct a_string) Removed.
5607         (struct b_string) Removed.
5608         (struct c_string) Removed.
5609         (struct len_string) New.
5610         (struct string) New.
5611         (macro as_streq) Removed.
5612         (macro bs_streq) Removed.
5613         (macro cs_streq) Removed.
5614         (macro sa_streq) Removed.
5615         (macro sb_streq) Removed.
5616         [__GNUC__] (inline function ds_putchar) New function.
5617         [__GNUC__] (inline function ds_length) New function.
5618         [__GNUC__] (inline function ds_value) New function.
5619         [__GNUC__] (inline function ds_end) New function.
5620
5621         * sysfile-info.c: (cmd_sysfile_info) Rephrased.
5622         (display_vectors) Fix missing i18n.
5623
5624         * t-test.q: Migrate to new q2c.
5625
5626         * tab.c: Migrate from arenas to pools.
5627         (tab_create) Use struct len_string.
5628         (tab_realloc) Ditto.
5629         (text_format) Ditto.
5630         (tab_joint_text) Ditto.
5631         (tab_natural_width) Remove rich text support.
5632         (tab_natural_height) Ditto.
5633         (tab_output_text) Handle TAT_FIX.
5634         (tab_raw) Change arg from a_string to len_string.
5635         (tabi_driver) Fix assertion.  Use struct len_string.
5636         (render_strip) Use struct len_string.  Remove rich text support.
5637         Add `const' qualifiers.
5638
5639         * tab.h: (enum TAB_RICH) Remove.
5640         (enums TAB_COL_NONE, TAB_COL_DONE) New.  Where appropriate,
5641         SOM_COL_* updated to read TAB_COL_*.
5642         (struct tab_table) Change arena to pool.  Change a_string to
5643         len_string.
5644
5645         * temporary.c: (restore_dictionary) Rewrite Checker code.
5646
5647         * var.h: (macros MAX_SHORT_STRING, MIN_LONG_STRING, SYSMIS,
5648         LOWEST, HIGHEST) Moved here from common.h.
5649         (typedef any_trns) Removed.  All references changed to `struct
5650         trns_header'.
5651
5652         * vars-atr.c: (force_create_variable) Fix assertion.
5653         (force_dup_variable) Fix assertion.
5654         
5655 Thu Jun  3 18:40:42 1999  Ben Pfaff  <blp@gnu.org>
5656
5657         Using alphanumeric variables in functions under AGGREGATE
5658         segfaulted.  Fixed.  Thanks to Dr. Dirk Melcher
5659         <BZN-mdksh@t-online.de> for reporting this bug.
5660         
5661         * aggregate.c: (parse_aggregate_functions) When setting the
5662         FSTRING bit, also allocate memory for the `string' member of
5663         agr_next.
5664         (free_aggregate_functions) Free iter->string.  Don't use the
5665         non-function bits when indexing the array of functions.
5666         [DEBUGGING] (debug_print) Don't use the non-function bits when
5667         indexing the array of functions.        
5668
5669 Sun May 30 00:00:54 1999  Ben Pfaff  <blp@gnu.org>
5670
5671         Under certain circumstances, the final case would be omitted from
5672         the results of an AGGREGATE operation.  Fixed.  Thanks to Dr. Dirk
5673         Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5674         
5675         * aggregate.c (agr_00x_end_func): Increment number of cases in
5676         sink before writing case.  For streams that keep track of how many
5677         cases there are based on this value, this means that the last case
5678         will be read in on the next stream read.
5679
5680 Sat May 29 22:03:31 1999  Ben Pfaff  <blp@gnu.org>
5681
5682         Undefined behavior was invoked by referencing a freed pointer.
5683         
5684         * vfm.c (memory_stream_write): Free pointer *after* checking for
5685         non-null status.
5686
5687 Sat May 29 22:02:22 1999  Ben Pfaff  <blp@gnu.org>
5688
5689         A wrong record size was displayed when paging the active file to
5690         disk.
5691         
5692         * vfm.c: (memory_stream_write) Fix off-by-one error.
5693
5694 Sat May 29 21:50:26 1999  Ben Pfaff  <blp@gnu.org>
5695
5696         Not having enough temporary space for sorting caused a core dump.
5697         Fixed.
5698         
5699         * sort.c: (allocate_cases) Initialize i.
5700
5701 Sat May 29 21:40:54 1999  Ben Pfaff  <blp@gnu.org>
5702
5703         Syntax errors in function descriptions on AGGREGATE caused core
5704         dumps.  Fixed.
5705         
5706         * aggregate.c (cmd_aggregate): Don't free agr_dict after calling
5707         free_aggregate_functions(), since that function already frees
5708         agr_dict.
5709         
5710 Sat May 29 21:06:10 1999  Ben Pfaff  <blp@gnu.org>
5711
5712         A null pointer was dereferenced, causing a core dump, when
5713         PERCENTILES was specified on FREQUENCIES.  This fixes the problem,
5714         but PSPP still doesn't calculate percentiles.  Thanks to Regnor
5715         Jernsletten <rjernsle@eunet.no> for reporting this problem.
5716         
5717         * arena.c: (arena_malloc) If the arena hasn't been initialized
5718         already, initialize it.
5719
5720 Sat May 29 20:47:29 1999  Ben Pfaff  <blp@gnu.org>
5721
5722         * Makefile.cygwin: New file supplied by Hankin <hankin@dunno.com>
5723         for compilation with Cygnus Windows B20.  Not used by other
5724         systems.
5725
5726 Sat May 29 20:36:04 1999  Ben Pfaff  <blp@gnu.org>
5727
5728         SORT always sorted in ascending order.  Fixed.  Thanks to Dr. Dirk
5729         Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5730
5731         * sort.c: (compare_case_lists) Reverse sense of comparison if
5732         sorting in descending order.
5733         (compare_record) Ditto.
5734
5735 Tue Mar  9 13:18:54 1999  Ben Pfaff  <blp@gnu.org>
5736
5737         SPLIT FILE with a string variable caused a core dump.  Fixed.
5738
5739         * vfm.c: If the variable is a string then make a temporary value
5740         struct pointing to it.  The underlying problem is a lot bigger
5741         than this (see TODO) but this is a stopgap for the simple case at
5742         least.
5743         
5744 Tue Mar  9 13:15:53 1999  Ben Pfaff  <blp@gnu.org>
5745
5746         Nested INCLUDEs didn't work.  Fixed.
5747
5748         * getline.c: (getl_include) Set first_line to NULL in allocated
5749         structure.
5750
5751 Tue Mar  9 13:13:46 1999  Ben Pfaff  <blp@gnu.org>
5752
5753         The MATCH FILES procedure set the values of variables not present
5754         to 0.  It should have been SYSMIS.  This is now fixed.
5755
5756         * get.c: (mtf_delete_file_in_place) Replace 0.0 by SYSMIS.
5757
5758 Tue Mar  9 12:52:23 1999  Ben Pfaff  <blp@gnu.org>
5759
5760         The REMARK command was too aggressive about skipping lines.  It
5761         didn't like being the last command in a file.
5762
5763         * command.c: (cmd_remark) Call get_entire_line() instead of
5764         get_line().
5765
5766 Tue Mar  9 12:48:05 1999  Ben Pfaff  <blp@gnu.org>
5767
5768         Comment parsing wasn't consistent with the rest of the code in its
5769         idea of where one command ends and another starts.  This meant
5770         that sometimes commands would be mysteriously ignored.  Thanks to
5771         Dr. Dirk Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5772          
5773         * command.c: (parse_cmd) Hand off comment parsing to new function
5774         skip_comment() in lexer.c.
5775         * lexer.c: (skip_comment) New function.
5776
5777 Wed Jan 20 20:22:07 1999  Ben Pfaff  <blp@gnu.org>
5778
5779         The TABLE subcommand on MATCH FILES worked only erratically at
5780         best.  This fixes it.  Thanks to Dr. Dirk Melcher
5781         <BZN-mdksh@t-online.de> for reporting this bug.
5782
5783         * get.c: (mtf_compare_BY_values) When comparing string values, a
5784         difference of 1 is still a difference :-)
5785         (mtf_processing) Inverted TABLE reading logic fixed.  Also don't
5786         advance TABLE files automatically when matched.  Comment fixes.
5787
5788 Tue Jan 19 22:32:31 1999  Ben Pfaff  <blp@gnu.org>
5789
5790         VARIABLE LABELS rejected a slash before the first variable
5791         specification, contradicting the documentation.  Thanks to Walter
5792         M. Gray <graywm@northernc.on.ca> for reporting this bug.
5793
5794         * var-labs.c: (cmd_variable_labels) Ignore a leading slash in
5795         command specification.
5796
5797 Tue Jan 19 22:29:54 1999  Ben Pfaff  <blp@gnu.org>
5798
5799         Because of an incorrect optimization in memory allocation,
5800         CROSSTABS sometimes segfaulted when asked to output multiple
5801         tables.  Thanks to Walter M. Gray <graywm@northernc.on.ca> for
5802         reporting this bug.
5803
5804         * crosstabs.q: (postcalc) New variables maxcols, maxcells, which
5805         are passed to output_pivot_table() for its use.
5806         (output_pivot_table) Instead of assuming the number of columns is
5807         constant, keep track with maxcols.  In general mode, use maxcells
5808         to determine whether more matrix cells need to be allocated.    
5809
5810 Tue Jan 19 22:27:46 1999  Ben Pfaff  <blp@gnu.org>
5811
5812         CROSSTABS didn't display value labels for column and row
5813         variables.  Thanks to Walter M. Gray <graywm@northernc.on.ca> for
5814         reporting this bug.
5815
5816         * crosstabs.q: (table_value_missing) If the specified value has a
5817         value label for this variable, then show it instead of the raw
5818         value.
5819         (display_dimensions) Delegate display of value_labels to
5820         table_value_missing.
5821
5822 Mon Jan 18 20:04:06 1999  Ben Pfaff  <blp@gnu.org>
5823
5824         WRITE didn't write line ends.  Fixed.  Thanks to Dr. Dirk Melcher
5825         <BZN-mdksh@t-online.de> for reporting this bug.
5826
5827         * print.c: (print_trns_proc) Write (CR/)LF if PRINT is used _or_
5828         if the file isn't declared as binary.
5829
5830 Mon Jan 18 19:56:45 1999  Ben Pfaff  <blp@gnu.org>
5831
5832         MATCH FILES corrupted memory and dumped core on some syntax
5833         errors.  Fixed.
5834
5835         * get.c: (cmd_match_files) Set file->handle to NULL before
5836         jumping to lossage.
5837         (mtf_free_file) Don't free a null dictionary.   
5838
5839 Mon Jan 18 19:27:57 1999  Ben Pfaff  <blp@gnu.org>
5840
5841         MATCH FILES should set numeric values not available to the
5842         system-missing value, not to 0.  Thanks to Dr. Dirk Melcher
5843         <BZN-mdksh@t-online.de> for reporting this bug.
5844
5845         * get.c: (mtf_processing) Set unused records to system-missing,
5846         not 0.
5847
5848 Mon Jan 18 15:06:46 1999  Ben Pfaff  <blp@gnu.org>
5849
5850         KEEP didn't work properly on the SAVE procedure.  Fixed.  Thanks
5851         to Ralf Geschke <ralf@kuerbis.org> for reporting this bug.
5852
5853         * temporary.c: (save_dictionary) Initialize var_by_name AVL tree
5854         in newly created dictionary, and add each copied variable to the
5855         tree.
5856  
5857 Mon Jan 18 15:04:48 1999  Ben Pfaff  <blp@gnu.org>
5858
5859         Memory leak fix.
5860         
5861         * get.c: (trim_dictionary) Free variable list for KEEP after
5862         finishing with it.
5863
5864 Mon Jan 18 12:57:36 1999  Ben Pfaff  <blp@gnu.org>
5865
5866         Some systems didn't like the way open_file was coded.  Thanks to
5867         Hankin <hankin@rogue.consultco.com> for pointing this out.
5868
5869         * filename.c: (open_file) Don't try to store stdin, stdout,
5870         stderr as part of an array, because that doesn't always work.
5871
5872 Mon Jan 18 12:53:27 1999  Ben Pfaff  <blp@gnu.org>
5873
5874         The SAVE procedure didn't save long string variables properly.
5875         Fixed by this patch.  Thanks to Hankin
5876         <hankin@rogue.consultco.com> for this patch.
5877         
5878         * sfm-write.c: (write_variable) Fix off-by-one error in writing
5879         out variable pad records.
5880
5881 Tue Jan  5 14:29:27 1999  Ben Pfaff  <blp@gnu.org>
5882
5883         Previously, if PRINT SPACE were given a negative argument, it
5884         would report an error, then spin in an (almost) infinite loop.
5885         This fixes that behavior.
5886
5887         * print.c: (print_space_trns_proc) After reporting a negative
5888         argument, set number of lines to print to 1.
5889
5890 Tue Jan  5 13:59:55 1999  Ben Pfaff  <blp@gnu.org>
5891
5892         SPSS 8.0 outputs some new record types in its system files, and it
5893         allows longer value labels.  Accept these system files.
5894
5895         * sfm-read.c: (sfm_read_dictionary) Ignore record type 7 subtype
5896         11 emitted by SPSS 8.0.
5897         
5898 Tue Jan  5 13:55:50 1999  Ben Pfaff  <blp@gnu.org>
5899
5900         The LIST procedure was too conservative in allocating space for
5901         buffers, which caused a bug that only showed up with very long
5902         output variables.  Thanks to Hankin <hankin@dunno.com> for this
5903         bug report.
5904
5905         * list.q: (determine_layout) Allocate 1022 bytes instead of 256.
5906
5907 Tue Jan  5 13:34:34 1999  Ben Pfaff  <blp@gnu.org>
5908
5909         Typo meant string format specifiers weren't checked properly.  I
5910         think that Hankin <hankin@dunno.com> sent me this report, but I'm
5911         willing to be corrected on this point.
5912  
5913         * format.c: (check_string_specifier) Fix obvious typo.  
5914
5915 Tue Jan  5 12:50:42 1999  Ben Pfaff  <blp@gnu.org>
5916
5917         Using $CASENUM in an expression didn't work.  Here's a fix.
5918         Thanks to Dirk Melcher <BZN-mdksh@t-online.de> for reporting this
5919         bug.
5920          
5921         * expr-evl.c: (evaluate_expression) Add OP_CASENUM case.
5922
5923         * expr-opt.c: (dump_node) OP_CASENUM is acceptable.
5924
5925 Tue Jan  5 12:47:48 1999  Ben Pfaff  <blp@gnu.org>
5926
5927         The changes in 0.2.1 to fix DATA LIST FREE parsing broke some
5928         other behavior, *sigh*.  This patch hopefully fixes that.  This
5929         time I've actually tested it.
5930
5931         Thanks to Hankin <hankin@dunno.com> for reporting this bug.
5932
5933         * data-list.c: (read_from_data_list_free,
5934         read_from_data_list_list) Call parse_string_as_format() directly
5935         without mucking around with the field width.
5936
5937 Tue Jan  5 12:31:19 1999  Ben Pfaff  <blp@gnu.org>
5938
5939         Occasionally, you may encounter a script that wants to be
5940         interpreted in interactive mode.  Make -i emulate this behavior to
5941         allow such scripts to be executed with PSPP.
5942
5943         Thanks to Hankin <hankin@dunno.com> for reporting this behavior.
5944
5945         * cmdline.c: (pre_syntax_message[]) Update -i description.
5946
5947         * lexer.c: (preprocess_line) When getl_interactive is 2 (i.e.,
5948         when -i is given on the command line) don't treat unindented lines
5949         as starting a new command.
5950
5951 Tue Jan  5 12:30:10 1999  Ben Pfaff  <blp@gnu.org>
5952
5953         In conjunction with egcs 1.1.1, Checker emits some bogus warnings,
5954         mostly caused by local initialized aggregates.  After egcs is
5955         fixed upstream these can be removed, but for now they're not a big
5956         deal.
5957         
5958         * ascii.c: (ascii_postopen_driver) Checker chokes on local
5959         initialized arrays.  Avoid this.
5960
5961         * sfm-write.c: (sfm_write_dictionary) Don't use a local
5962         initialized struct.
5963
5964 Tue Jan  5 12:07:24 1999  Ben Pfaff  <blp@gnu.org>
5965
5966         egcs 1.1.1 has some new warnings relative to gcc 2.8.1, which the
5967         following changes avoid.  Currently I compile sources with egcs
5968         1.1.1 and gcc 2.7.2.3 before sending them out.
5969
5970         * apply-dict.c: (apply_dict) Use new avl_traverser_init() macro.
5971         
5972         * ascii.c: (option_tab[]) Initialize all struct members.
5973
5974         * avl.h: (avl_traverser_init) New macro.
5975         
5976         * command.c: (DEFCMD, UNIMPL macros, cmd_table[]) Initialize all
5977         struct members.
5978
5979         * crosstabs.q: (enum_var_values) Use new hsh_iterator_init()
5980         macro.
5981
5982         * hash.c: Comment fix.
5983
5984         * hash.h: (hsh_iterator_init) New macro.
5985
5986         * html.c: (option_tab[]) Initialize all struct members.
5987
5988         * pfm-write.c: (write_value_labels) Use new avl_traverser_init()
5989         macro.
5990
5991         * postscript.c: (option_tab[]) Initialize all struct members.
5992         (output_encodings, preclose, dump_lines) Use new
5993         hsh_iterator_init() macro.
5994
5995         * sfm-write.c: (write_value_labels) Use new avl_traverser_init()
5996         macro.
5997
5998         * sysfile-info.c: (describe_variable) Use new avl_traverser_init()
5999         macro.
6000
6001 Thu Nov 19 12:32:45 1998  Ben Pfaff  <blp@gnu.org>
6002
6003         * data-in.c: Examined each of the parsing functions to make sure
6004         that they wouldn't dump core if they were passed a string of the
6005         wrong length, since now the DATA LIST FREE/LIST routines don't
6006         check for field width before passing it to the data parser.
6007         (parse_RBHEX, parse_AHEX) Reject odd length input.
6008         (parse_string_as_format) Reject input that's too short or too
6009         long.
6010
6011         * data-list.c: Before, the DATA LIST FREE/LIST routines would pad
6012         a field to its entire declared output width then pass it to the
6013         data-in parsing routines.  This contradicted the documented
6014         behavior.  This is fixed in these changes.  Thanks to Mark H. Wood
6015         <mwood@IUPUI.Edu>.  In addition, this fixes a few more details of
6016         free-format parsing that differed from SPSS.
6017         (cut_field) Commas and spaces are treated identically.  Returns
6018         the proper column instead of a fixed 1 value.
6019         (parse_field) Removed.
6020         (read_from_data_list_free, read_from_data_list_list) Call
6021         parse_string_as_format directly instead of parse_field.
6022
6023         * heap.c: (heap_delete) Stylistic fixes.
6024
6025 Sun Aug  9 11:12:13 1998  Ben Pfaff  <blp@gnu.org>
6026
6027         * loop.c: (loop_2_trns_proc) Formatting fix.
6028
6029         * sel-if.c: (cmd_filter) Set FILTER_before_TEMPORARY.
6030
6031         * var.h: (glob var FILTER_before_TEMPORARY) New global var.
6032
6033         * vfm.c: (macro FILTERED) New.
6034         (static var filter_var) New.
6035         (process_active_file_write_case) Use FILTERED.
6036         (setup_filter) Set filter_var.
6037         (close_active_file) Delete the filter if not
6038         FILTER_before_TEMPORARY.
6039         (procedure_write_case) Use FILTERED.
6040
6041 Sat Aug  8 00:20:14 1998  Ben Pfaff  <blp@gnu.org>
6042
6043         * crosstabs.q: Changed /PIVOT={ON,OFF} to /FORMAT={PIVOT,NOPIVOT}.
6044
6045         * data-in.c: (parse_day_count) Message fix.
6046         (parse_month) Style fix.
6047
6048         * data-list.c: (struct data_list_pgm) New member eof.
6049         (cmd_data_list) Init eof to 0.
6050         (do_reading) Implement the /END subcommand and read-past-eof
6051         checking.
6052
6053         * do-if.c: Include stdio.h when debugging.
6054         (cmd_else_if) Make sure the command is .-terminated.
6055
6056         * glob.c: (init_glob) Capitalize the command prompt.
6057
6058         * inpt-pgm.c: (end_case_trns_proc) Debugging message.
6059         (end_file_trns_proc) Debugging message.
6060
6061         * loop.c: (internal_cmd_loop) Make it work when there's no loop
6062         index!
6063         (loop_2_trns_proc) Enable MXLOOPS (why was this disabled?)
6064
6065         * main.c: (dump_token) Make kwtab[] const.
6066
6067         * set.q: Spelling, comment fixes.
6068
6069         * sysfile-info.c: (cmd_display) DISPLAY VECTORS not DISPLAY
6070         VECTOR.
6071
6072         * vars-prs.c: (fill_all_vars) Style fix.
6073
6074         * vfm.c: (index_to_varname) Return const.
6075
6076 Tue Aug  4 23:49:23 1998  Ben Pfaff  <blp@gnu.org>
6077
6078         * Changes in many source files for partial -ansi -pedantic and
6079         no-debugging compliance: Remove trailing common in enum
6080         declarations; add `unused' attributes; insert some appropriate
6081         casts.
6082
6083         * cmdline.c: (parse_command_line) Add new --testing-mode flag.
6084
6085         * command.c: (shell) Make static.
6086         (run_command) Make static.
6087
6088         * data-list.c: (dump_fixed_table) Remove use of local_strdup().
6089
6090         * dfm.c: (cmd_begin_data) I18n fix.
6091
6092         * error.c: (verbose_msg) Define if __STRICT_ANSI__.
6093
6094         * error.h: (macro verbose_msg) Define if __STRICT_ANSI__.
6095
6096         * expr-opt.c: (evaluate_tree) Don't initialize local arrays if
6097         __STRICT_ANSI__.
6098
6099         * file-handle.q: Don't prepend the source file directory name to
6100         the data file name.  (Ongoing issue.)
6101         (prepend_current_directory) Comment out.
6102         (internal_cmd_file_handle) Don't call prepend_current_directory().
6103         (fh_get_handle_by_filename) Ditto.
6104
6105         * filename.c: Append zero byte to readlink() return value.
6106
6107         * getline.c: (getl_read_line) I18n fix.
6108
6109         * lexer.h: Don't use gcc features if __STRICT_ANSI__.
6110
6111         * misc.h: Don't use gcc features if __STRICT_ANSI__.
6112
6113         * pfm-write.c: (bufwrite) Don't try to increment a void * pointer
6114         directly.
6115
6116         * postscript.c: (output_encodings) Don't use local_strdup().
6117         (postopen) Ditto.
6118
6119         * print.c: Don't use gcc features if __STRICT_ANSI__.
6120
6121         * q2c.c: (dump_vars) Don't put a , at the end of the last enum.
6122
6123         * recode.c: (parse_src_spec) Fully brace nested if's.
6124
6125         * set.q: (global var set_testing_mode) New var.
6126
6127 Wed Jul 29 22:01:44 1998  Ben Pfaff  <blp@gnu.org>
6128
6129         * ascii.c: Add some more `unused' attributes that only come into
6130         play when NDEBUG is defined.
6131         (ascii_close_page) Set s_len when reallocating s.
6132         
6133         * crosstabs.q: (delete_missing) New function.
6134         (output_pivot_table) Call delete_missing() if /MISSING=REPORT.
6135         (make_summary_table) Create summary table reallocable.
6136
6137         * postscript.c: Add more `unused' attributes as above.
6138
6139         * tab.c: (tab_create) [GLOBAL_DEBUGGING] Set reallocable member.
6140         (tab_realloc) [GLOBAL_DEBUGGING] Assert that table is reallocable.
6141          
6142         * tab.h: (struct tab_table) [GLOBAL_DEBUGGING] New `reallocable'
6143         member.
6144
6145         * var.h: (macro force_dup_variable) [!GLOBAL_DEBUGGING] Remove
6146         gratuitous space between parameter definition.
6147
6148         * vars-atr.c: Changed some assert(0)'s to abort()'s to prevent
6149         complaints about running off the end of functions with NDEBUG
6150         enabled.
6151
6152 Sun Jul  5 00:17:25 1998  Ben Pfaff  <blp@gnu.org>
6153
6154         * Several source files: Removed some PORTME notes when reflection
6155         revealed that ANSI forbids that sort of breakage.  Also, added
6156         lots of `unused' qualifiers here and there.
6157
6158         * aggregate.c: (accumulate_aggregate_info) Remove local var
6159         weighting that turned out not to be used.
6160
6161         * avl.c: Update to version 1.1.0.  Add unused specifier.
6162         (avl_destroy) Initialize ab to 0.  Comment fixes.  Cast return
6163         value to void *.
6164         (avl_probe) Replace some instances of 1 with +1 where appropriate.
6165         (avl_find) Cast return value to void *.
6166         (avl_delete) q doesn't need to be initialized at the beginning of
6167         the function.  Replace some instances of 1 with +1.
6168         (force_avl_delete) Renamed avl_force_delete, all references changed.
6169         (compare_ints) `param' marked unused.
6170         (print_int) `param' marked unused.
6171         (recurse_tree) Replace some instances of 1 with +1.
6172
6173         * avl.h: Update to version 1.1.0.  Only declares avl function
6174         types if not already declared.
6175         (AVL_MAX_HEIGHT) Only define if not already defined.
6176         (struct avl_node) New unused member char pad[2].
6177         [GLOBAL_DEBUGGING] Change conditionalization to NDEBUG instead.
6178         (force_avl_insert) Renamed avl_force_insert.
6179         (force_avl_delete) Renamed avl_force_delete.
6180
6181         * crosstabs.q: (struct table_entry) Put `freq' into a union with
6182         new member `data'.
6183         (struct crosstab) Add new member `ofs'.
6184         (glob var int_tab) Removed.
6185         (custom_tables) In integer mode, assign v[i] properly through the
6186         indirect var_dict.
6187         (custom_variables) Now p.crs.max == max + 1.
6188         [DEBUGGING] (debug_print) p.crs.min and p.crs.max are now ints.
6189         (precalc) Implement integer mode.
6190         (calc_integer) Implement integer mode.
6191         (compare_table_entry) Remove unused local variable `comparing'.
6192         (make_summary_table) Implement integer mode.
6193         (macro ns_rows) Implemented as static variable now.
6194         (several variables) Made static, from global.
6195         (output_pivot_table) Use table_value_missing() for column heads.
6196         Remove several unused local variables.  Implement integer mode
6197         table summing.  Count up ns_rows.
6198         (crosstabs_dim) Make columns wider when /MISSING=REPORT requested.
6199         (find_pivot_extent) Moved into find_pivot_extent_general; now just
6200         calls that function or find_pivot_extent_integer.
6201         (find_pivot_extent_integer) New function.
6202         (enum_var_values) Implemented for integer mode.
6203         (table_value_missing) New function.
6204         (display_dimensions) Call table_value_missing() for heads.
6205         (float_M_suffix) New function.
6206         (display_crosstabulation) Call table_value_missing() for row
6207         heads.  Handle missing values in /MISSING=REPORT mode.
6208         (calc_fisher) Remove unused var N.
6209         (calc_r) Remove unused var fact.
6210
6211         * data-list.c: (dump_fixed_table) Fix table dimensioning.
6212         (read_one_set_of_repetitions) Remove unused vars var_spec, column.
6213
6214         * data-out.c: (insert_commas) Remove unused var cp.
6215         (convert_CCx) Remove unused vars save_set_decimal,
6216         save_set_grouping.
6217
6218         * descript.q: (dump_z_table) Fix table dimensioning.
6219         (pre_calc) Remove unused var j.
6220         (display) Remove unused vars title, s.  Fix table dimensioning.
6221
6222         * expr-evl.c: Comment fixes.
6223
6224         * frequencies.q: (full_dim) New function.
6225         (dump_full) Fix table dimensioning.
6226         (condensed_dim) New function.
6227         (dump_condensed) Fix table dimensioning.
6228
6229         * get.c: (cmd_match_files) Remove unused var n_val.  Remove unused
6230         label winnage.
6231
6232         * html.c: (html_close_drive) Remove unused var i.
6233         (postopen) Remove unused vars title, curfn_len, cp.
6234         (preclose) Remove unused vars this, x.
6235
6236         * lexer.c: Comment fixes.
6237
6238         * matrix-data.c: (cmd_matrix_data) Remove unused var index.
6239
6240         * means.q: (custom_tables) Remove unused var m_dim.
6241
6242         * mis-val.c: Format fix.
6243
6244         * modify-vars.c: (cmd_modify_vars) Remove unused var new_dict.
6245
6246         * output.c: (outp_get_paper_size) Remove unused var cp.
6247
6248         * pfm-read.c: (read_float) Remove unused var save, unused label
6249         underflow.
6250         (read_variables) Remove unused vars cp, j.
6251         (read_value_label) Remove unused var j.
6252
6253         * pfm-write.c: (bufwrite) Remove unused var i.
6254
6255         * postscript.c: (ps_postopen_drive) Remove unused vars dev_info,
6256         fn.
6257         (output_encodings) Remove unused vars char_cp, n_output.
6258         (read_ps_encodings) Remove unused var ep.
6259         (postopen) Remove unused var title.
6260         (preclose) Remove unused var fp.
6261         (ps_open_page) Remove unused vars true, false, orientation,
6262         mirror_horz, mirror_vert, width, length.
6263         (ps_text_metrics) Remove unused var x.
6264
6265         * q2c.c: (find_symbol) Remove unused var y.
6266         (parse_setting) Remove unused parameter sbc, all references
6267         changed.
6268         (dump_parser) Remove unused var cp.
6269         (dump_free) Remove unused var i.
6270
6271         * set.q: (static vars args, n) Removed.
6272         (internal_cmd_gset) Removed.
6273
6274         * sfm-read.c: (sfm_read_dictionary) Removed unused var i.
6275         (read_machine_flt64_info) Removed unused var file_endian.
6276         (read_documents) Removed unused var i.
6277         (read_compressed_data) Removed unused parameter dict, all
6278         references changed.
6279
6280         * sfm-write.c: (bufwrite) Removed unused var i.
6281         (sfm_write_case) Removed unused var i.
6282
6283         * sort.c: (merge_once) Remove unused var t.
6284         (write_separate) #if 0 out as dead code.
6285
6286         * split-file.c: (cmd_split_file) Remove unused var i.
6287
6288         * sysfile-info.c: (sysfile_info_dim) New function.
6289         (cmd_sysfile_info) Fix table dimensioning.
6290         (variables_dim) New function.
6291         (display_variables) Fix table dimensioning.
6292         (describe_variable) Remove unused var prev_r.
6293
6294         * t-test.q: (z_postcalc) Removed.
6295         (pairs_calc) Remove unused var bad_weight.
6296         (postcalc) Remove unused vars dfn, dfd.
6297
6298         * tab.c: (tab_create) Set t->dim to NULL.
6299         (tab_dim) Make sure t->dim is NULL first.
6300         (tab_natural_width) Remove parameter `clamp'.
6301         (tab_value) Remove duplicate assertion for table.
6302         (tab_raw) New function.
6303         (nowrap_dim) New function.
6304         (wrap_dim) New function.
6305         (tab_output_text) Fix table dimensioning.
6306
6307         * tab.h: (tab_raw) New macro.
6308
6309         * val-labs.c: (get_label) Remove unused var type.
6310         (copy_value_labels) Remove unused var trav.
6311
6312         * var.h: (struct crosstab_proc) Completely changed.
6313
6314         * vars-prs.c: (parse_dict_variable) Remove unused var v.
6315
6316         * vfm.c: (open_active_file) Remove unused vars i, lp.
6317
6318         * weight.c: (weight_trns_proc) #if 0 out as dead code.
6319         
6320 Tue Jun  2 23:37:21 1998  Ben Pfaff  <blp@gnu.org>
6321
6322         * Makefile.am: Add apply-dict.c, flip.c.
6323
6324         * apply-dict.c: New file.
6325         
6326         * command.c: (struct command) Make cmd[] larger for CLEAR
6327         TRANSFORMATIONS command name.
6328         (parse_cmd) Make sure we're in a valid state before using it as an
6329         index.  Discard variables and reset state on invalid transitions.
6330         (cmd_clear_transformations) New function.
6331
6332         * command.def: Add APPLY DICTIONARY, CLEAR TRANSFORMATIONS, FLIP.
6333         Add unimplemented PRESERVE, RESTORE.
6334
6335         * file-handle.h: Include stddef.h.
6336
6337         * flip.c: New file.
6338         
6339         * pfm-read.c: (parse_value) Pad value label values with spaces,
6340         not nulls.
6341
6342         * sfm-read.c: (struct sfm_fhuser_ext) Add reference count.
6343         (sfm_close) Decrement reference count, make sure it's zero.
6344         (sfm_maybe_close) New function.
6345         (sfm_read_dictionary) Handle reference counts.
6346
6347         * vars-atr.c: (clear_default_dict) New function.
6348         (discard_variables) Use clear_default_dict().
6349
6350 Sun May 31 00:58:05 1998  Ben Pfaff  <blp@gnu.org>
6351
6352         * Makefile.am: Add pfm-write.c.
6353         (LDADD) Add the libgmp2 libraries.
6354
6355         * command.def: Define EXPORT.
6356
6357         * get.c: (cmd_export) New function.
6358         (export_write_case_func) New function.
6359
6360         * pfm-read.c: (static spss2ascii[]) Make it const.
6361
6362         * pfm-write.c: New file.
6363
6364         * sfm-write.c: Formatting, comment fixes.
6365
6366         * var.h: Comment fix.
6367
6368 Fri May 29 21:44:12 1998  Ben Pfaff  <blp@gnu.org>
6369
6370         * Makefile.am: Add pfm.h, pfm-read.c.
6371
6372         * command.def: IMPORT is now implemented.
6373
6374         * format.c: (glob var translate_fmt[]) New var.
6375
6376         * get.c: (enum GTSV_NONE) Renamed GTSV_OPT_NONE.
6377         (cmd_import) New function.
6378         (import_source_read) New function.
6379         (glob var import_source) New var.
6380
6381         * pfm-read.c: New file.
6382
6383         * pfm.h: New file.
6384         
6385         * sfm-read.c: (parse_format_spec) Local variable translate_fmt[]
6386         moved in format.c.
6387         (dump_dictionary) Disabled printing a couple of items.
6388
6389 Mon May 25 12:42:37 1998  Ben Pfaff  <blp@gnu.org>
6390
6391         * crosstabs.q: (postcalc) Call make_summary_table().
6392         (make_summary_table) New function.
6393         (insert_summary) New function.
6394         (display_dimensions) Remove some unnecessary arguments, all
6395         references changed.
6396         (output_pivot_table) Fix lots of problems with the risk table
6397         setup.
6398         (submit) Don't display an empty table.
6399         (display_risk) Fix order of arguments to calc_risk().
6400
6401         * glob.c: Always include assert.h and stdlib.h.
6402
6403         * output.h: (enum OUTP_T_JUST_FULL) Removed, all references
6404         removed.
6405
6406         * tab.c: (tab_create) Cosmetic changes.
6407
6408         * tab.h: (enum TAB_JUSTIFY) Removed, all references removed.
6409
6410 Sun May 24 22:39:23 1998  Ben Pfaff  <blp@gnu.org>
6411
6412         * tab.def: Removed.
6413
6414         * crosstabs.q: (output_pivot_table) Headers drawing and submission
6415         code simplified, moved into new function submit().
6416         (submit) New function.
6417         (crosstabs_dim) New function.
6418         (display_directional) Substitute variable names for %s where
6419         appropriate.
6420         (somers_d_v[], somers_d_ase[], somers_d_t[]) New static vars.
6421         (calc_symmetric) Initialize parameters only if non-NULL.
6422         Calculate Somers' d.
6423         (calc_directional) Calculate Somers' d (or copy it, really).
6424         Calculate eta.
6425
6426         * output.c: (outp_string_width) New function.
6427
6428         * postscript.c: (postopen) Calculate font widths based on the
6429         width of the zero '0' character, not the width of the space
6430         character.  Set paper-width and paper-length based on points, not
6431         device units.
6432         (ps_open_page) Fix page setup string for landscape mode.
6433
6434         * som.h: (struct som_dimension) Removed.
6435         (struct som_table_class) height, width members take int * not
6436         som_dimesion * now.
6437
6438         * tab.c: Many functions now have added parameter validation.
6439         (tab_height, tab_width) These functions were removed and merged
6440         into a single function tab_resize(), and all references changed.
6441         (tab_dim) Rewritten since the interface changed; reduced from
6442         hundreds of lines to two.  All callers were changed.  Currently
6443         most of them just use tab_natural_dimensions as their callback and
6444         await detailed translation of functionality.
6445         (tab_natural_width) New function.
6446         (tab_natural_height) New function.
6447         (tab_natural_dimensions) New function.  This is a callback
6448         function, not something that you'd want to call directly.
6449         (tab_nat_dim) Removed.
6450         (tabi_table) Allocates t->w and t->h.
6451         (tabi_driver) Inlined sum_columns()'s functionality.  Calls the
6452         dimensions callback.
6453         (evaluate_dimensions) Removed.
6454         (sum_columns) Removed.
6455
6456         * tab.h: (enum TAL_1THIN) Removed.
6457         (enum series t_*) Removed.
6458         (struct tab_table) Members trh, trv changed to unsigned char *
6459         from int *.  Member dim changed to a function pointer from a
6460         unsigned char *.  Member max_stack_height removed.  New members
6461         hr_tot, vr_tot.
6462         (macros tab_l, tab_r, tab_t, tab_b) New.
6463
6464 Sat May 23 23:22:13 1998  Ben Pfaff  <blp@gnu.org>
6465
6466         * ascii.c: (delineate) Assign last_space_nchars before skipping
6467         spaces, to fix right justification.
6468
6469         * crosstabs.q: (static vars risk, direct) New vars.
6470         (static var pearson_r) Removed.
6471         (glob var chisq_fisher) Made static.
6472         (static vars row_tot[], col_tot[]) Don't include grand total
6473         anymore.
6474         (static var grand_total) Renamed W, all references changed.
6475         (output_pivot_table) Only make `table' if num_cells != 0.  Make
6476         risk and directional tables.  Deal with grand total no longer part
6477         of col_tot[].  Free rows and cols after we're done with them.
6478         (display_risk) New function.
6479         (display_directional) New function.
6480         (clac_r) Rewritten so that it stores all its results into its
6481         arguments, so it can be used for Spearman's correlation too.
6482         (calc_symmetric) Added a t[] argument, all references changed.
6483         Calculates ASEs for tau-b, tau-c, gamma.  Calculates Spearman's r,
6484         Pearson's r, Cohen's kappa.
6485         (calc_risk) New function.
6486         (calc_directional) New function.
6487
6488         * som.c: (som_submit) Improved debugging code.
6489
6490         * stats.c: (hypercube) New function.
6491         (cube) New function.
6492         (sqr) New function.
6493         (normal_sig) Went back to old implementation, which actually
6494         worked.
6495
6496         * stats.h: (macros square, cube, hypercube) Removed.  The
6497         equivalent functions in stats.c are inlined here; all references
6498         to square changed to sqr.
6499
6500 Fri May 22 00:03:41 1998  Ben Pfaff  <blp@gnu.org>
6501
6502         * crosstabs.q: (N_SYMMETRIC) New define.
6503         (postcalc) Disable debug printing.
6504         (static vars chisq_fisher, pearson_r) New.
6505         (output_pivot_table) Add support for symmetric measures.  Add
6506         chi-square output of exact sigs.
6507         (display_chisq) Rewritten.
6508         (display_symmetric) New function.
6509         (gamma_int) New function.
6510         (Pr) New function.
6511         (swap) New function.
6512         (calc_fisher) New function.
6513         (calc_chisq) Check boundary conditions better. Calculate Yates,
6514         Fisher, Mantel-Haenszel tests.
6515         (calc_r) New function.
6516         (calc_symmetric) New function.
6517
6518         * stats.c: (normal_sig) Rewritten with new algorithm.  Renamed
6519         from calc_normal.
6520         (chisq_sig) Better boundary conditions.  Renamed from
6521         calc_significance.
6522
6523         * tab.h: (struct tab_table) New member cf.
6524
6525         * tab.c: (tab_create) Set cf.
6526         (tab_width) New function.
6527         (tab_realloc) Handle cf.
6528         (tab_vline) Handle cf.
6529         (tab_hline) Handle cf.
6530         (tab_box) Handle cf.
6531         (tab_value) Handle cf.
6532         (tab_float) Handle cf.
6533         (tab_text) Handle cf.
6534         (tab_joint_text) Handle cf.
6535         (tab_offset) Handle cf.
6536         (tab_next_row) Handle cf.
6537         (evaluate_dimensions) Handle cf.
6538         (render_strip) Handle cf.
6539
6540 Wed May 20 00:03:59 1998  Ben Pfaff  <blp@gnu.org>
6541
6542         * crosstabs.q: (postcalc) New vars row_tot, col_tot, pass them to
6543         output_pivot_table().
6544         (output_pivot_table) Moved lots of local variables outside and
6545         made them static.  Add beginnings of chi-square statistic
6546         support.  Now column and row totals aren't in the main matrix.
6547         Always zero out any leftover rows & columns after we're done with
6548         the table entries.  Move all output stuff into
6549         display_dimensions(), display_crosstabs(), display_chisq().
6550         (display_dimensions) New function.
6551         (display_crosstabulation) New function.
6552         (display_chisq) New function.
6553         (calc_chisq) Implemented Pearson and likelihood-ratio chisquares.
6554
6555         * frequencies.q: (dump_full, dump_condensed) Remove tab_null()
6556         references, simplify logic.
6557
6558         * postscript.c: Remove scale, translate-x, translate-y,
6559         mirror-horz, mirror-vert, rotate-180 options.
6560         (struct ps_driver_ext) Remove scale, translate_x, translate_y.
6561         All references deleted.
6562         (macro YT) New macro.
6563         (array option_tab[]) Removed options.
6564         (ps_option) Removed options.
6565         (ps_open_page) Write page setup explicitly to output file, without
6566         using now-deleted BP function.
6567         (macro dump_line) Use YT().
6568         (macro dump_thick_line) Use YT().
6569         (draw_headers) Use YT().
6570         (switch_font) Reorder arguments to SF function.
6571         (write_text) Use YT().
6572
6573         * sfm-read.c: (sfm_read_case) Don't attempt to read variables that
6574         have get.fv == -1.
6575
6576         * sysfile-info.c: (describe_variables) Don't use tab_nulls().
6577
6578         * tab.c: (tab_create) Initialize t->ct to zeros.  Remove
6579         null-debugging code.
6580         (tab_realloc) Remove null-debugging code.  Initialize new regions
6581         of t->ct to zeros.
6582         (tab_vline) Support offsets.
6583         (tab_hline) Support offsets.
6584         (tab_box) Support offsets.
6585         (tab_null) Removed.
6586         (tab_nulls) Removed.
6587         (tab_row) Removed.
6588         (tab_col) Removed.
6589         (evaluate_dimensions) Remove null-debugging code.  Understand
6590         TAB_EMPTY attribute.  Assert that text.s.s is always non-NULL if
6591         TAB_EMPTY not present.
6592
6593         * tab.h: New cell attribute TAB_EMPTY.
6594         (macros tab_nr, tab_nc, tab_row, tab_col) New.
6595
6596         * vars-atr.c: (init_variable) Set get.fv to -1 so that GET doesn't
6597         try to read them from system files.
6598
6599         * vfm.c: (dump_splits) Don't call tab_null().   
6600
6601 Sat May 16 19:36:55 1998  Ben Pfaff  <blp@gnu.org>
6602
6603         * crosstabs.q: (struct crosstab) Added `missing' member.
6604         (custom_tables) Init missing.
6605         (calc_general) Handle missing values.
6606         (calc_chisq) New function.
6607         (output_pivot_table) Start work on chi-square output.  Update for
6608         new tab offset support functions.  Shorten statistic names.
6609
6610         * Several files: add in more `const's to placate gcc's warnings.
6611
6612         * tab.h: (struct tab_table) Add col_ofs, row_ofs members.  Comment
6613         fixes.
6614
6615         * tab.c: (tab_height, tab_realloc, tab_vline, tab_hline, tab_box,
6616         tab_null, tab_nulls, tab_value, tab_float, tab_text,
6617         tab_joint_text) Add col_ofs and row_ofs support.
6618         (tab_offset) New function.
6619         (tab_next_row) New function.
6620         (tab_row) New function.
6621         (tab_col) New function.
6622         (tabi_table) Add col_ofs and row_ofs support.
6623
6624         * vars-atr.c: (is_system_missing) New function.
6625
6626 Tue May 12 16:14:30 1998  Ben Pfaff  <blp@gnu.org>
6627
6628         * crosstabs.q: Expanded subcommand names RESID --> RESIDUAL, etc.
6629         (static var no_cells) Removed.
6630         (static var num_cells) New.
6631         (static var expected) New.
6632         (static var cells[]) New.
6633         (internal_cmd_crosstabs) Deal with new variables.
6634         (postcalc) Removed most of the meat and put it in new function
6635         output_pivot_table().
6636         (output_pivot_table) Calculates and outputs an entire pivot table.
6637
6638         * postscript.c: (postopen) Fix problems with free()ing addresses
6639         not obtained from malloc().
6640
6641         * som.c: (som_submit) Add assertion.
6642
6643         * sysfile-info.c: (describe_variable) Use new tab_nulls()
6644         function.
6645
6646         * tab.c: (static var tab_names[]) New.
6647         (tab_realloc) -1 for nc or nr indicates no change.
6648         (tab_nulls) New function.
6649         (tab_dim) Use tab_names[].
6650         (tabi_cumulate) Don't include bottom or right headers.  Furrfu.
6651         (evaluate_dimensions) Don't terminate on uninited cells, just put
6652         an X in them and emit a notice.  Use tab_names[].
6653
6654         * tab.h: Move bits into tab.def.
6655
6656         * tab.def: New.  Don't try to declare tab_table_class because then
6657         som.h has to be included.       
6658         
6659 Thu May  7 22:55:04 1998  Ben Pfaff  <blp@gnu.org>
6660
6661         * command.def: New file, contains all the command definitions
6662         previously included bodily in command.c.
6663
6664         * format.def: New file, contains all of the format definitions
6665         previously split across format.h, format.c, and sfm-write.c.
6666
6667         * lexer.h: Renamed from tokens.h in order to match corresponding
6668         .c file name.
6669
6670         * lexerP.h: Moved some rarely used functions exported by lexer.c
6671         into here.
6672
6673         * Makefile.am: Commemorate renamed files.
6674         (EXTRA_DIST) Add command.def, format.def.
6675
6676         * command.c: [0] (walk_cmdtable_func) Removed.
6677
6678         * crosstabs.q: (postcalc) Made it work and print out matrices
6679         proving it.
6680         (enum_column_values) Renamed enum_var_values, generalized for any
6681         variable.
6682
6683         * format.h: (struct fmt_desc) New member `spss'.
6684
6685         * q2c.c: (main) Generated code includes lexer.h instead of
6686         tokens.h.
6687
6688         * sfm-write.c: (write_format_spec) Use new spss member of fmt_spec
6689         instead of an independent translation table.
6690
6691 Tue May  5 13:19:03 1998  Ben Pfaff  <blp@gnu.org>
6692
6693         * Lots of source files: Added const to declarations.
6694
6695         * aggregate.c: (parse_aggregate_function) Rename inner i to j.
6696         
6697         * arena.c: (arena_clear) Set prev pointer to null when done.
6698
6699         * ascii.c: (ascii_option) Rename index as indx.
6700
6701         * avl.c: This is now a separate library called libavl.
6702         (xmalloc) Make static.
6703         (avl_probe) Step A7 can use the cache instead of an explicit
6704         compare.
6705         (avl_delete) Don't maintain a q pointer because it's always
6706         available in the pointer stack.  Comment fix.
6707
6708         * avl.h: This is now a separate library called libavl.
6709
6710         * command.c: (cmd_table[]) Remove spurious trailing "".
6711
6712         * common.h: Only include random() fix if this system needs it.
6713
6714         * crosstabs.q: Include alloca headers.
6715         (n_sorted_tab) New global var.
6716         (postcalc) Mostly rewritten.
6717         (find_pivot_extent) Rewritten.
6718         (enum_column_values) Rewritten.
6719
6720         * data-out.c: (convert_F) Rename inner n as n_spaces.
6721
6722         * error.c: (dump_message) Don't have an outer var i.
6723
6724         * file-handle.q: (static var f) Removed.  All references removed.
6725         (internal_cmd_file_handle) Uses a local variable instead of f.
6726
6727         * get.c: (trim_dictionary) Change scope of i, i1, i2.
6728         (cmd_match_files) Don't strcpy tokstr into sbc (why was this ever
6729         done?)
6730
6731         * getline.h: Declare getl_history as extern.  Reported by
6732         palme@uni-wuppertal.de (Hubert Palme).
6733
6734         * postscript.c: (postopen) Some large mods for constness.
6735
6736         * recode.c: Remove spurious copyrights since PSPP is owned by FSF
6737         anyway.
6738
6739 Fri Apr 24 12:52:47 1998  Ben Pfaff  <blp@gnu.org>
6740
6741         * Makefile.am: Rename BUILT_SOURCES to q_sources, all references
6742         changed.  Add avl.c, avl.h to pspp_SOURCES.  Remove avllib from
6743         LDADD.
6744
6745         * avl.c, avl.h: New files.  These form a clean-room
6746         reimplementation of avllib.  Iterative algorithms are used in
6747         place of recursive ones, so there is no resemblance in the code.
6748
6749         * Lots of headers: Don't include other headers by default.
6750
6751         * Lots of source files: Explicitly include all needed headers.
6752
6753         * arena.c: (arena_clear) New function.
6754
6755         * crosstabs.q: (ROW_VAR, COL_VAR) New enums.
6756         (static var ar) Removed.
6757         (staitc vars ar_tc, ar_col) New.
6758         (cmd_crosstabs) Destroy the arenas.
6759         (internal_cmd_crosstabs) Create the arenas.
6760         (precalc) Don't need a free function for the hash.
6761         (calc_general) Make sure to zero out the trailer on the key data
6762         before inserting.
6763         (print_table_entries) Updated.
6764         (postcalc) Worked on actually implementing.
6765         (find_pivot_extent) New function.
6766         (compare_value) New function.
6767         (enum_column_values) New function.
6768
6769         * data-in.c: (parse_month) Make local array `static const'.
6770         
6771         * data-out.c: (convert_date) Make local array `static const'.
6772         (convert_WKDAY) Same.
6773         (convert_MONTH) Same.
6774
6775         * frequencies.q: (postprocess_freq_tab) avl_walk_inorder() has
6776         been renamed to avl_walk().
6777         
6778         * hash.c: Rewritten more efficiently.
6779
6780         * hash.h: Add attribute const to hsh_next_prime declaration.
6781
6782         * lexer.c: (id_match) Make arguments const.
6783
6784         * postscript.c: (ps_postopen_driver) Make default fonts the
6785         Helvetica family.
6786
6787         * q2c.c: (main) Generated code needs stdlib.h.
6788
6789         * sfm-write.c: (write_value_labels) An avl_traverser needs to be
6790         initialized to 0 now, not to NULL.  All other references to
6791         avl_traverser were updated in the same way.
6792
6793         * tokens.h: Macro version of id_match updated to use const
6794         properly.
6795
6796         * val-labs.c: (inc_ref_count) New function.
6797         (copy_value_labels) Simply through use of new avl_copy() function.
6798
6799 Wed Apr 15 13:01:58 1998  Ben Pfaff  <blp@gnu.org>
6800
6801         * crosstabs.q: Probably doesn't compile.  New PIVOT subcommand.
6802         (postcalc) Worked on this.
6803
6804         * postscript.c: (OPO_DOUBLE_LINE) New enum.
6805         (struct ps_driver_ext) New line_width_thick member.
6806         (ps_preopen_drive) Init line_width_thick.
6807         (option_tab[]) Add line-* options.
6808         (ps_option) Parse line-* options.
6809         (postopen) Add line_width_thick support.  Strip leading spaces on
6810         prologue output lines.
6811         (ps_open_page) Include line_width_thick in output.
6812         (macro dump_thick_line) New.
6813         (dump_fancy_line) Support thick lines as well as double lines.
6814
6815 Tue Apr 14 00:50:08 1998  Ben Pfaff  <blp@gnu.org>
6816
6817         * Makefile.am: Add crosstabs.c to BUILT_SOURCES.  Add crosstabs.q
6818         to pspp_SOURCES.  Add crosstabs.q to EXTRA_DIST.
6819
6820         * Many source files: Rename `options' to `pv_opts' as appropriate.
6821
6822         * command.c: (static var cmd_table[]) Add CROSSTABS command.
6823
6824         * common.c: (xcalloc) New function.
6825
6826         * crosstabs.q: New file.  Not finished yet, though.
6827                 
6828         * data-list.c: Comment fix.
6829
6830         * error.c: Remove some old Checker cruft.
6831
6832         * frequencies.q: (dump_full) Cumulate valid percent instead of
6833         regular percent.
6834
6835         * getline.c: Comment fix.
6836
6837         * hash.c: Comment fixes.
6838
6839         * hash.h: (struct hsh_table) Make hash functions return unsigned
6840         instead of int to avoid problems with taking the modulo of
6841         negative return values.  All references changed.
6842
6843         * misc.c: (intlog10) Make its table static const instead of auto.
6844
6845         * sfm-read.c: (read_header) Make `prefix' static const instead of
6846         auto.
6847
6848         * var.h: (union value) Add member `hash'.
6849         (struct variable) Rename prv_index as `foo'--all references
6850         changed.  Reorder.
6851         (typedef pv_opts) Removed.  All references changed.
6852
6853         * vars-prs.c: (parse_variables) Message fixes.
6854         
6855 Mon Mar  9 15:35:08 1998  Ben Pfaff  <blp@gnu.org>
6856
6857         * get.c: (cmd_match_files) Don't reverse the order of FILEs as
6858         they are being inserted.  Don't check for BY variables of
6859         different types.  Discard variables if the active file isn't
6860         included in the merge.
6861         (mtf_processing) Essentially rewritten.
6862         (mtf_merge_dictionary) Check for master/slave variables of
6863         different types/widths.
6864
6865         * vfm.c: (static var not_canceled) New var.
6866         (process_active_file) Don't call vfm_source->read() if
6867         there's no vfm-source.  Initialize not_canceled.
6868         (process_active_file_write_case) Honor and update not_canceled.
6869         (prepare_for_writing) Rollback changes from yesterday, they were
6870         wrong.
6871         (close_active_file) Don't destroy vfm_source unless it exists.
6872         
6873 Mon Mar  9 00:56:16 1998  Ben Pfaff  <blp@gnu.org>
6874
6875         * Lots of source files: Added { } around nested if/else constructs
6876         to avoid new gcc 2.8 warnings.
6877
6878         * data-in.c: (parse_Z) Declare `int' type explicitly.
6879         (convert_Z) Ditto.
6880
6881         * get.c: (struct mtf_file) Add prev, next_min, by, input members.
6882         (cmd_match_files) Initialize mtf_by_values.  Manage by, input,
6883         prev members.  Put TABLEs at the end of the chain and FILEs at the
6884         beginning.  Don't allow the active file in STATE_INIT.  Use proper
6885         `seen' value for the active file.  Fill out the by members and
6886         make sure they're of consistent type.  Do the actual merge
6887         operation.
6888         (mtf_processing_finish) New function.
6889         (var_type_description) New function.
6890         (mtf_free_file) New function.
6891         (mtf_free) Rewritten.
6892         (mtf_delete_file_in_place) New function.
6893         (mtf_read_nonactive_records) New function.
6894         (mtf_compare_BY_values) New function.
6895         (static var mtf_seq_no) New var.
6896         (mtf_processing) New function.
6897         (mtf_merge_dictionary) Assign nval members for the system file
6898         dictionary.  Assign fv values for its variables.  Point each slave
6899         variable to the corresponding master variable.
6900
6901         * hash.c: Include str.h.
6902
6903         * mis-val.c: (copy_missing_values) src arg is const.
6904
6905         * misc.c: (spacing) Make `max' var explicitly int.
6906
6907         * sfm-read.c: (dump_dictionary) Message reformatting.
6908         (sfm_read_case) Add assertion.
6909
6910         * sort.c: Esthetic fixes.
6911
6912         * var.h: (struct match_files_proc) New struct.
6913         (struct variable) Add private data match_files_proc.
6914
6915         * vars-atr.c: (delete_variable) Implement.  Add argument for the
6916         dictionary that owning the variable.
6917         (dup_variable) Add assertion.
6918
6919         * vfm.c: Comment fixes, hopefully the comments are correct now.
6920         (process_active_file) New function.
6921         (process_active_file_write_case) New function.
6922         (process_active_file_output_case) New function.
6923         (prepare_for_writing) Use temp_dict->nval for vfm_info, not
6924         default_dict.nval.
6925         (write_case) Renamed procedure_write_case().  Now write_case is a
6926         pointer to a function.  Style fixes.
6927         
6928 1998-03-05  Ben Pfaff  <blp@gnu.org>
6929
6930         * Makefile.am: (q2c) Link with libmisc.
6931         (version.c) Define default_config_path, include_path,
6932         groff_font_path.
6933
6934         * ascii.c: (ascii_postopen_driver) When the default newline string
6935         is requested, open file in text mode.  Suggested by
6936         palme@uni-wuppertal.de (Hubert Palme).
6937         (static vars line_buf, line_p) Change from char * to unsigned char
6938         *.
6939         (ascii_close_page) char * to unsigned char *.
6940
6941         * cmdline.c: (parse_command_line) Implement -r option by
6942         prepending ~/.pspp/rc to the list of files to process.
6943
6944         * command.c: (cmd_remark) Reset getl_prompt to the standard prompt
6945         before pulling in a final line.
6946         (null_func, null_int_func) Removed (dead code).
6947
6948         * descript.q: (display) Calculate width of variable name column
6949         properly.  Calculate number of valid cases properly.  Reported by
6950         palme@uni-wuppertal.de (Hubert Palme).
6951
6952         * filename.c: (init_filename) Use default_config_path instead of
6953         now obsolete CONFIG_PATH.
6954
6955         * getline.c: (getl_initialize) Use include_path instead of now
6956         obsolete INCLUDE_PATH.
6957         (getl_add_file) New argument `where'.  All references changed.
6958
6959         * groff.c: (find_font_file) Use groff_font_path instead of now
6960         obsolete GROFF_FONT_PATH.
6961         
6962         * postscript.c: (find_ps_file) Use groff_font_path instead of now
6963         obsolete GROFF_FONT_PATH.  Copy through temporary variable to
6964         avoid problems with constness.
6965
6966         * str.h: (macro cs_streq) New macro.
6967
6968         * version.h: (glob var default_config_path, include_path,
6969         groff_font_path) New vars.
6970         
6971 1998-02-23  Ben Pfaff  <blp@gnu.org>
6972
6973         * Many source files: Change verbose_msg() priority levels and
6974         messages.
6975
6976         * aggregate.c: Include debug-print.h.
6977
6978         * cmdline.c: (parse_command_line) Add --safer/-s and --command/-c
6979         options.
6980         (static var pre_syntax_message) Document --safer/-s and
6981         --command/-c.
6982
6983         * command.c: (cmd_erase, cmd_host) Disable if set_safer is set.
6984
6985         * dfm.c: (open_inline_file) [__CHECKER__] Zero out ext->file,
6986         because it's not used but it's still copied.
6987         (open_file_r) Remove gratuitous debug message.
6988
6989         * filename.c: (safety_violation) New function.
6990         (open_file) Remove gratuitous debug messages.  Don't allow pipe
6991         files if set_safer is set.
6992
6993         * get.c: Turn off debugging.
6994
6995         * getline.c: (getl_add_virtual_file) New function.
6996         (getl_read_line) Add verbose_msg() call for opening new syntax
6997         file.
6998         (getl_perform_delayed_reset) Add a return value describing whether
6999         any action was taken.  Call reset_eof().
7000
7001         * getline.h: Comment fix.
7002
7003         * groff-font.c: (groff_read_font) Use `goto next_iteration' in
7004         place of incorrect `continue'.  Use strtok_r() instead of
7005         strtok().  Always check strtok_r() return value.
7006         (groff_read_DESC) Use strtok_r() instead of strtok().
7007
7008         * lexer.c: (reset_eof) New function.
7009
7010         * main.c: (parse) Get a token after performing a delayed reset
7011         action; allow empty syntax files.
7012
7013         * postscript.c: (output_encodings) Use strtok_r() instead of
7014         strtok().
7015
7016         * q2c.c: (dump_parser) Use strtok_r() instead of strtok().
7017
7018         * set.q: Comment fixes.
7019         (glob var set_safer) New var.
7020         (internal_cmd_set) Support SAFER.
7021
7022         * str.h: [!HAVE_STRTOK_R] Declare strtok_r() prototype.
7023
7024         * temporary.c: (free_dictionary) Set d->splits to NULL after
7025         freeing.
7026
7027         * vars-atr.c: (clear_variable) Decrement dict->n_splits if
7028         variable deleted, not if it *isn't* deleted.
7029
7030 1998-02-16  Ben Pfaff  <blp@gnu.org>
7031
7032         * command.c: (array cmd_table[]) Add MATCH FILES.
7033
7034         * common.c: Comment fixes.
7035
7036         * data-list.c, dfm.c, error.c, filename.c, list.q, matrix-data.c,
7037         modify-vars.c, postscript.c, sfm-read.c, sfm-write.c, tab.c:
7038         Include alloca.h.  Problem reported by palme@uni-wuppertal.de
7039         (Hubert Palme).
7040
7041         * expr-opt.c: Include str.h.  Problem reported by
7042         palme@uni-wuppertal.de (Hubert Palme).
7043
7044         * get.c: (cmd_get) [DEBUGGING] Update v->p.get to v->get.
7045         (static var mtf_by) Change from char ** to variable **.
7046         (static var mtf_master) New var.
7047         (mtf_merge_dictionary) New function.
7048         (cmd_match_files) Init mtf_master.  Parse mtf_by according to new
7049         var type.  Reorder tests properly.  Initialize file->dict.  Detect
7050         TABLE= without BY=.  Read file dictionaries and merge them.  Give
7051         subcommand name with IN, LAST, FIRST error messages.  Create IN,
7052         LAST, FIRST variables.  Comment fixes.
7053         (mtf_free) Don't free default_dict.  Free mtf_master.
7054
7055         * getline.c: Define getl_mode.  Change getl_buf_size to size_t
7056         from int.
7057         (handle_line_buffer) Cast int to size_t in comparison to avoid
7058         warning.
7059
7060         * getline.h: Declare getl_mode extern.
7061
7062         * groff-font.c: (groff_read_font) Type-fix calls to getline.
7063         (groff_read_DESC) Make line_size a size_t.
7064         (match_tok) Parenthesize name to avoid macro expansion.
7065
7066         * mis-val.c: (copy_missing_values) New function.
7067
7068         * postscript.c: (postopen) Make buf_size a size_t.
7069
7070         * sfm-read.c: (dump_dictionary) Make global from static.  Print
7071         variable info in parts for easier debugging with Checker.
7072
7073         * temporary.c: (copy_variable) Use copy_value_labels().
7074         (new_dictionary) New arg: whether to copy file label, documents.
7075
7076         * val-labs.c: (copy_value_labels) New function.
7077
7078         * var.h: (enums MISSING_*) Add MISSING_COUNT.
7079
7080         * vars-atr.c: [GLOBAL_DEBUGGING] (force_dup_variable) New
7081         function.
7082         (dup_variable) Set prv_index, get.fv, get.nv.
7083
7084 Fri Feb 13 15:38:36 1998  Ben Pfaff  <blp@gnu.org>
7085
7086         * Makefile.am: (pspp_SOURCE) Add htmlP.h.
7087
7088         * Many source files: For ANSI-compliance, add empty statement
7089         after label.  Reported by palme@uni-wuppertal.de (Hubert Palme)
7090         and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
7091
7092         * data-in.c: (parse_numeric) Some header files break on
7093         -DBL_MIN_10_EXP because they get a --; add () for safety.
7094         Reported by palme@uni-wuppertal.de (Hubert Palme).
7095
7096         * dfm.c: Idea by Dr Eberhard W Lisse <el@linux.lisse.na>.
7097         (struct dfm_fhuser_ext) Change `file' from FILE * to file_ext.
7098         (dfm_close) Use close_file_ext.
7099         (open_inline_file) Set file.file to NULL, not file.
7100         (open_file_r, open_file_w) Initialize file.file; fill in file_ext
7101         struct and use open_file_ext().
7102         (read_record) Use file.file.
7103
7104         * file-handle.q: (prepend_current_directory) Pass through special
7105         filenames.
7106
7107         * filename.c: Only include unistd.h if HAVE_UNISTD_H.
7108         (normalize_filename) Pass through special filenames.
7109         (open_file, close_file) Accept pipe| and |pipe syntaxes as
7110         equivalent.
7111         (dirname) Rename blp_dirname() because of name conflict on some
7112         OS.  All references changed.  Reported by palme@uni-wuppertal.de
7113         (Hubert Palme).
7114         (is_special_filename) New function.
7115
7116         * get.c: (GTSV_OPT*) Add GTSV_OPT_MATCH_FILES.
7117         (trim_dictionary) Conditionalize some of the options on whether
7118         GTSV_OPT_MATCH_FILES is in *options.
7119         (rename_variables) Don't allow variables to be renamed as scratch
7120         variables.
7121         (MTF_*) New enum series.
7122         (struct mtf_file) New struct.
7123         (static vars mtf_head, mtf_tail, mtf_by, mtf_n_by, mtf_free) New
7124         vars.
7125         (cmd_match_files, mtf_free) New functions.
7126
7127         * lexer.c: (match_int) Needed parentheses around name to escape
7128         macro expansion.  Reported by Micah Altman
7129         <maltman@www-vdc.fas.harvard.edu>.
7130
7131         * print.c: Needed to include alloca.h.  Reported by Micah Altman
7132         <maltman@www-vdc.fas.harvard.edu>.
7133
7134         * recode.c: (convert_to_double) Parenthesize -DBL_MIN_10_EXP to
7135         -(DBL_MIN_10_EXP).  Reported by palme@uni-wuppertal.de (Hubert
7136         Palme).
7137         
7138         * str.h: Include stdarg.h.  Reported by palme@uni-wuppertal.de
7139         (Hubert Palme) and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
7140
7141 Thu Feb  5 00:18:21 1998  Ben Pfaff  <blp@gnu.org>
7142
7143         * html.c: (struct html_driver_ext) Move into htmlP.h.
7144         (html_preopen_driver) Initialize cp_x, cp_y.
7145         (html_submit) Implement as call to output_tab_table().
7146         (change_attributes) New function.
7147         (escape_string) New function.
7148         (output_tab_table) New function.
7149
7150         * list.q: (write_all_headers) Add code for writing headers for the
7151         html driver.
7152         (clean_up) Write out the html close-table tag.
7153         (determine_layout) Ignore html driver.
7154         (list_cases) Write html data.
7155
7156         * som.c: (som_submit) Move more of the code into output_table().
7157
7158         * tab.c: (static var hit) Make a global var and rename tab_hit.
7159         (static var tab_table_class) Make a global var.
7160
7161         * htmlP.h: New file.
7162
7163 Tue Feb  3 16:12:18 1998  Ben Pfaff  <blp@gnu.org>
7164
7165         * dump-sysfile.c: Removed.
7166
7167         * html.c: (preclose) Change comment in emitted code.
7168
7169         * matrix-data.c: Debugging off by default.  Comment fixes.
7170         (static var container) New var.
7171         (cmd_matrix_data) Create and destroy container.  Initialize
7172         is_per_factor[] to 0s.  Move code into new function
7173         string_to_content_type().  Require split values to be present in
7174         the data when ROWTYPE_ is explicit.  Call specific function, not
7175         general read_matrices().
7176         (string_to_content_type) New function.
7177         (context) Exclude all whitespace, not just spaces.
7178         (mget_token) A dot is a number.  Add assertion.
7179         (static var data) Renamed nr_data.
7180         (static var factor_values) Renamed nr_factor_values.
7181         (read_matrices) Renamed read_matrices_without_rowtype().  Handle
7182         only specific case.  Close data_file before exit.
7183         (fill_matrix) New function.
7184         (read_data_lines) Renamed nr_read_data_lines().  Remove debug
7185         printing.  Style fixes.  Message fixes.  Move code into
7186         fill_matrix().
7187         (read_matrices_without_rowtype) Rename
7188         matrix_data_read_without_rowtype().  Fix off-by-one error on
7189         loops.  Allocate nr_data[] memory from arena.
7190         (read_matrices_with_rowtype) Removed.
7191         (read_splits) Renamed nr_read_splits().  Style fixes.
7192         (read_factors) Renamed nr_read_factors().
7193         (dump_cell_content) Comment fixes.  Arguments changed.  Change
7194         debug printing.  All references changed.
7195         (output_data) Renamed nr_output_data().
7196         (static var wr_content) New var.
7197         (struct factor_data) New struct.
7198         (static var wr_data) New var.
7199         (static var wr_current) New var.
7200         (matrix_data_source_destroy_source) Removed.
7201         (read_matrices_with_rowtype) New function.
7202         (matrix_data_read_with_rowtype) New function.
7203         (wr_read_splits) New function.
7204         (compare_factors) New function.
7205         (wr_output_data) New function.
7206         (wr_read_rowtype) New function.
7207         (wr_read_factors) New function.
7208         (wr_read_indeps) New function.
7209         (glob var matrix_data_source) Make destroy_source member NULL as
7210         well.
7211
7212 Fri Jan 23 00:09:08 1998  Ben Pfaff  <blp@gnu.org>
7213
7214         * lexer.c: (syntax_error) Give better error message when at end of
7215         file.
7216
7217         * matrix-data.c: (var content_names[]) Fix PROX spelling.  Change
7218         N_SCALAR to output as plain N.
7219         (mdump_token) Change output format.
7220         (context) Fix message output interaction with spaces in input.
7221         (another_token) New function.
7222         (force_eol) Improved error message.
7223         (static var max_cell_index) New var.
7224         (read_matrices) Init `cells'.  factor_values is now per-cell.
7225         Init max_cell_index.
7226         (read_data_lines) Replace `compare' local with new `compare' arg.
7227         Debugging messages changed.  Only read factors if per_factor.
7228         Propagate error return from read_factors(), force_eol().
7229         Copy N_SCALAR values across the N vector.
7230         (read_matrices_without_rowtype) Don't init `cells'.  Don't need to
7231         check parentheses manually since we now have is_per_factor[].
7232         Call read_data_lines() with new args.  Check for end of data after
7233         looping, using another_token().
7234         (read_factors) Arguments changed.  Use max_cell_index to determine
7235         whether to read or compare factors.  Message fixes.
7236         (dump_cell_content) New function.
7237         (output_data) Completely rewritten because content types were
7238         supported to be nested inside factor values, not vice versa.
7239         
7240 Thu Jan 22 00:26:38 1998  Ben Pfaff  <blp@gnu.org>
7241
7242         * lexer.c: (syntax_error) Support formatted varargs messages.
7243
7244         * matrix-data.c: Turn debugging on by default.
7245         (static content_type[]) New array.
7246         (static content_names[]) New array.
7247         (static rowtype_, varname_) New vars.
7248         (static is_per_factor[]) New array.
7249         (static split_values) Moved declaration.
7250         (static n_continuous, first_continuous) New var.
7251         (cmd_matrix_data) Don't init split_values.  Assign ROWTYPE_ to
7252         rowtype_.  Simplify SPLIT code.  Init is_per_factor[].  Assign
7253         VARNAME_ to varname_.  Initialize first_continuous, n_continuous.
7254         Check for continuous variables.
7255         [DEBUGGING] (debug_print) Remove content_names[].
7256         (mdump_token) New macro.
7257         (mget_token_dump) New function.
7258         (mdump_token) New function.
7259         (context) New function.
7260         (mget_token) Fix messages.
7261         (static var data, split_values, factor_values) New vars.
7262         (read_matrices) Manage split_values, factor_values.
7263         (read_data_lines) New function.
7264         (read_matrices_without_rowtype) Implemented.
7265         (read_splits) Message fixes.  Uses `just_read'.
7266         (read_factors) New function.
7267         (output_data) New function.
7268         (matrix_data_source_destroy_source) Close the file handle.
7269         (glob var matrix_source) Change name from "DATA LIST" to "MATRIX
7270         DATA".
7271
7272         * str.c: (strpadcmp) Removed.
7273
7274         * vfm.c: (dump_splits) Initialize i; fix test for end of splits.
7275
7276 Sun Jan 18 00:30:59 1998  Ben Pfaff  <blp@gnu.org>
7277
7278         * Lots of source files: Add cast to unsigned character to calls to
7279         tolower() and toupper().
7280
7281         * aggregate.c: Set default_dict.splits to NULL.
7282
7283         * command.c: (static variable tab[]) Add MATRIX DATA.
7284
7285         * data-in.c: Add debugging defines.  Formatting fixes.
7286
7287         * expr-opt.c: Formatting fixes.
7288
7289         * lexer.c: (syntax_error) Message fixes.
7290
7291         * matrix-data.c: New enum series.
7292         (static vars fmt, section, diag, explicit_rowtype, signle_split,
7293         split_values, n_factors, factors, cells, pop_n, contents,
7294         n_contents) New vars.
7295         (cmd_matrix_data) Finished implementation.
7296         (compare_variables_by_mxd_vartype) New function.
7297         [DEBUGGING] (debug_print) New function.
7298         (static vars mtoken, mtokstr, mtoklen, mtokval) New vars.
7299         (read_matrices) New function.
7300         (read_matrices_without_rowtype) New function.
7301         (read_matrices_with_rowtype) New function.
7302         (read_splits) New function.
7303         (mget_token) New function.
7304         (force_eol) New function.
7305         [0] (test_tokenizer) New function.
7306         (matrix_data_source_destroy_source) New function.
7307         (glob var matrix_data_source) New var.
7308
7309         * misc.h: Include ieeefp.h if present.
7310
7311         * split-file.h: (cmd_split_file) Changes corresponding to struct
7312         dictionary changes.
7313
7314         * str.h: Fix memmem prototype.
7315
7316         * temporary.c: (save_dictionary, restore_dictionary,
7317         free_dictionary) Changes corresponding to struct dictionary
7318         changes.
7319
7320         * var.h: (MXD_* enums) New enum series.
7321         (struct matrix_data_proc) New struct.
7322         (struct split) Removed.
7323         (struct dictionary) Changed `splits' member from `split *' to
7324         `variable **'.
7325         (macro force_create_variable) New macro.  Replaced lots of
7326         create_variable()/assert() calls with calls to this macro.
7327
7328         * vars-atr.c: (discard_variables) Changed assertion.
7329         [GLOBAL_DEBUGGING] (force_create_variable) New function
7330         called by the macro of the same name.
7331         (clear_variable) Changes to delete splits from the dictionary
7332         corresponding to struct dictionary changes.
7333
7334         * vars-prs.c: (parse_variables) [GLOBAL_DEBUGGING] Check for
7335         corrupted variable `index' values in the dictionary passed in
7336         every time this function is called.
7337
7338         * vfm.c: (dump_splits, SPLIT_FILE_procfunc) Changes corresponding
7339         to struct dictionary changes.
7340
7341 Tue Jan 13 23:45:02 1998  Ben Pfaff  <blp@gnu.org>
7342
7343         * Makefile.am: (pspp_SOURCES) Add matrix-data.c.
7344
7345         * command.c: New includes.
7346         (static array cmd_table[]) Add ERASE, HOST, NEW FILE.
7347         (cmd_erase) New function.
7348         [unix] (shell) New function.
7349         (run_command) New function.
7350         (cmd_host) New function.
7351         (cmd_new_file) New function.
7352
7353         * expr-prs.c: (parse_primary) Message fix.
7354
7355         * inpt-pgm.c: Formatting fix.
7356         (cmd_reread) Implement the FILE subcommand.
7357
7358         * matrix-data.c: New file.
7359
7360         * q2c.c: (dump_header) Change output commenting style.
7361
7362         * weight.c: Comment fix.
7363
7364 Tue Jan 13 00:53:39 1998  Ben Pfaff  <blp@gnu.org>
7365
7366         * aggregate.c: (buf64_10x) Renamed buf64_1xx, all references
7367         changed.
7368         (buf_10x) Renamed buf_1xx, all references changed.
7369         (cmd_aggregate) Implemented cases 010, 011, 110, and 111 (all
7370         cases now implemented).
7371         (create_sysfile) New function.
7372         (agr_11x_func) New function.
7373
7374         * data-in.c: (parse_numeric) Work properly if there's an
7375         explicitly coded decimal point in the data and decimal places are
7376         specified on DATA LIST.  Bug reported by Dr Eberhard W Lisse
7377         <el@linux.lisse.na>.
7378
7379         * get.c: (cmd_get, cmd_save_internal) Allow extraneous slash
7380         before file specification on GET, SAVE, XSAVE.  Bug reported by Dr
7381         Eberhard W Lisse <el@linux.lisse.na>.
7382
7383         * q2c.c: [!HAVE_STRERROR] Include misc/strerror.c, not
7384         strerror.c.  Bug reported by Alexandre Oliva
7385         <oliva@dcc.unicamp.br>.
7386
7387         * sort.c: Include sort.h.  Comment fixes.  A few esthetic fixes.
7388         (static var separate_case_tab) New var.
7389         (cmd_sort_cases) Cancel temporary transformations here.  Free
7390         v_sort before return.
7391         (sort_cases) Run an EXECUTE procedure if SEPARATE is nonzero and
7392         we're reading from a sort stream.  Don't cancel temporary
7393         transformations.  Offload internal sorting to do_internal_sort().
7394         (do_internal_sort) New function.  Handles internal sorting even
7395         when SEPARATE is nonzero.  Doesn't free v_sort.
7396         (do_external_sort) Take new arg SEPARATE.  Only destroy `x' if
7397         it's non-NULL.
7398         (write_initial_runs) Take new arg SEPARATE.  Only destroy the old
7399         sink if SEPARATE is zero.
7400         (read_output_cases) Renamed read_sort_output(), all references
7401         changed.  Now uses separate_case_tab when it exists.
7402         (write_separate) New function.
7403
7404         * vfm.c: (page_to_disk) Destroy memory_source_cases, not
7405         memory_sink_cases.  Don't redundantly call
7406         vfm_source->destroy_source().
7407         (memory_stream_mode) After switching over, set memory_sink_cases
7408         to NULL.
7409
7410 Sat Jan 10 23:35:51 1998  Ben Pfaff  <blp@gnu.org>
7411
7412         * aggregate.c: (struct agr_var) Expand dbl[] array from 2 to 3
7413         elements.
7414         (static var prev_case) New, moved out of aggregate_single_case()
7415         local scope.
7416         (static var buf64_10x, buf_10x) New.
7417         (cmd_aggregate) Initialize prev_case.  Comment fixes.  Implement
7418         the 000, 001, 100, and 101 cases.  Free prev_case.
7419         (parse_aggregate_functions) Disallow scratch variables.
7420         (free_aggregate_functions) Only free agr_dict if non-null.  Use
7421         iter->function to determine numeric/string type, not
7422         iter->src->type.
7423         (aggregate_single_case) Don't manage prev_case.  Initialize
7424         aggregate info after dumping it.
7425         (accumulate_aggregate_info) Fix sum, weighted sum, mean, weighted
7426         mean, stddev, weighted stddev definitions.
7427         (dump_aggregate_info) Implemented.
7428         (initialize_aggregate_info) Renamed from
7429         initialize_aggregate_functions().  Initializes dbl[2].
7430         (agr_00x_trns_proc, agr_00x_end_func, write_case_to_sfm,
7431         agr_10x_trns_proc, agr_10x_trns_free, agr_10x_end_func) New.
7432
7433         * cases.c: (alloc_val) Removed.
7434
7435         * get.c: (cmd_save_internal) Initialize new `dict' member.
7436
7437         * sfm-write.c: (sfm_write_dictionary, write_header,
7438         write_variable, write_value_labels, write_documents) Reorganize,
7439         simplify for new parameter structure.
7440         (write_variable) Only one variable * argument now.
7441
7442         * sfm.h: (struct sfm_write_info) Removed `pri', `sec', and
7443         replaced by new `dict' member.
7444
7445         * temporary.c: (new_dictionary) Initialize n_documents.
7446
7447         * vars-atr.c: (dup_variable) Allocate `value's from dict into
7448         v->fv manually.
7449         (init_variable, replace_variable) Eliminate usage of alloc_val().
7450
7451         * vars-prs.c: (parse_DATA_LIST_vars) Accept PV_NO_SCRATCH option.
7452
7453         * vfm.c: (arrange_compaction) Allow `temporary' value of 2 to
7454         signal that AGGREGATE is to be used for forming final cases.
7455         (close_active_file) Call end_func before stopping lagging.  Cancel
7456         temporary after finishing compaction.
7457         (write_case) Comment fixes.  Cleaned up.
7458         (compact_case) Let AGGREGATE handle compaction when `temporary' is
7459         2.
7460
7461 Sat Jan 10 02:10:47 1998  Ben Pfaff  <blp@gnu.org>
7462
7463         * Makefile.am: (BUILT_SOURCES) Add means.c.
7464         (pspp_SOURCES) Add means.c.
7465         (EXTRA_DIST) Add means.q.
7466
7467         * command.c: (array cmd_table[]) Add MEANS.
7468
7469         * common.h: Esthetic fixes.  Comment fixes.  Test for
7470         MAX_SHORT_STRING greater than 8.
7471         (macros LOWEST, HIGHEST) New.
7472
7473         * data-in.c, data-list.c, recode.c: Comment fixes.
7474
7475         * means.q: New file, base version.
7476
7477         * mis-val.c: (parse_num_or_range, parse_numeric) Replace -DBL_MAX
7478         with LOWEST, DBL_MAX with HIGHEST.
7479
7480         * q2c.c: (dump_vars) Add an enum to array types giving the number
7481         of values for the enum.
7482
7483         * sfm-read.c: (sfm_read_dictionary, read_machine_flt64_info)
7484         Replace second_lowest_value with second_lowest_flt64.
7485
7486         * sfm-write.c: (write_variable, write_rec_7_34) Replace
7487         second_lowest_value with second_lowest_flt64.
7488
7489         * t-test.q: Comment fix.
7490
7491         * temporary.c: (restore_dictionary) Esthetic fix.
7492
7493         * tokens.h: (force_match_id, force_match, force_string, force_int,
7494         force_num, force_id) Replace msg() with syntax_error().
7495
7496         * var.h: (struct means_proc) New.
7497         (struct variable) Add mns member to `p' union.
7498
7499         * vars-prs.c: (parse_variable, parse_dict_variable,
7500         parse_variables, parse_DATA_LIST_vars) Replace msg() with
7501         syntax_error().
7502
7503 Thu Jan  8 22:28:41 1998  Ben Pfaff  <blp@gnu.org>
7504
7505         * Makefile.am: (pspp_SOURCES) Add tab.h.
7506
7507         * Most source files: Added a cast to unsigned char in usages of
7508         the ctype is*() functions.  Replaced `end of command expected'
7509         calls to msg() with calls to syntax_error().
7510
7511         * frequencies.q: (dump_condensed) Fix tab_dim() column reference.
7512
7513         * lexer.c: (hex_val) Removed (was dead code).
7514         (idmatch) Parenthesize function name to avoid macro expansion.
7515
7516         * postscript.c: Comment fixes.
7517         (ps_preopen_driver) Change default font size to 10pt.
7518
7519         * sfm-read.c: (read_variables) Byteswap sv.print, sv.write as
7520         int32s.
7521         (parse_format_spec) Change system-file format spec argument type
7522         to int32.  Parse the format spec with bitwise operators.
7523
7524         * sfmP.h: (struct sysfile_format) Removed.
7525         (struct sysfile_variable) Changed print, write members from
7526         sysfile_format to int32.
7527
7528         * tokens.h: Esthetic fixes.
7529         [__GNUC__] (macro id_match) New macro to hopefully speed up
7530         identifier matching.
7531         (macros match_id, match_tok, match_int) Implemented in
7532         compiler-independent manner; no longer GNU C only.
7533
7534         * vfm.h: Include time.h.
7535
7536 Mon Jan  5 11:06:15 1998  Ben Pfaff  <blp@gnu.org>
7537
7538         * data-list.c: (dump_fixed_table) Change tab_dim().
7539
7540         * dump-sysfile.c: (open_sysfile) Fix mmap() call.
7541
7542         * error.c: Include command.h.
7543
7544         * frequencies.g: Formatting fixes.
7545
7546         * frequencies.q: Add tab_dim() calls.  Make the total cell a
7547         joined cell.
7548
7549         * glob.c: Include command.h.
7550
7551         * sfm-read.c: (struct sfm_fhuser_ext) New members sysmis, highest,
7552         lowest.
7553         (sfm_read_dictionary) Initialize sysmis, highest, lowest.
7554         (sfm_read_machine_flt64_info) Update sysmis, highest, lowest.
7555         (read_variables) Byteswap sv.type; byteswap sv.print, sv.write as
7556         the other elements (is this right?).
7557         (read_variables) Use lowest, highest members.
7558         (parse_format_spec) New arg `vv' for more stringent checking.
7559         (dump_dictionary) Byteswaps nonexplicit data.
7560         (sfm_read_case) Byteswap numeric data.
7561
7562         * som.c: Initialize table_num to 1.
7563         (render_segments) Remember to increment y_index after each table
7564         segment.
7565
7566         * sysfile-info.c: (cmd_sysfile_info) Change tab_dim().  Don't call
7567         avl_count() on a NULL tree.  No title for the second table.
7568         (cmd_display) Handle DISPLAY VECTORS by calling display_vectors().
7569         Handle AS_SCRATCH as AS_NAMES.  Warn if no variables.  Re-enable;
7570         fix call to display_variables().
7571         (display_variables) Default to 4 columns, not 3.  Set up headers.
7572         Column title is Variable, not Name.  Fix index column.
7573         Add joint text.  Add tab_dim().  Handle value labels properly.
7574         Handle DISPLAY LABELS properly.  Draw boxes correctly.
7575         (describe_variable) Value labels don't need titles.  Don't clear
7576         nonexistent index column.
7577         (compare_vectors_by_name) New function.
7578         (display_vectors) New function.
7579
7580         * tab.c: (tab_height) Add assertion.
7581         (tab_null) Add debug code.
7582         (evaluate_dimensions) Add debug code.
7583
7584         * var.h: (struct variable) get_proc data is sometimes used
7585         simultaneously with other per-procedure info, therefore it was
7586         removed from the union.  All references changed.        
7587
7588 Sun Jan  4 18:13:33 1998  Ben Pfaff  <blp@gnu.org>
7589
7590         * ascii.c: (ascii_close_page) Put title on second line of headers
7591         if there is no subtitle.
7592
7593         * command.c: (glob var cur_proc) Move definition here, from
7594         common.c.
7595         (cmd_remark) Emit blank line before remarks.
7596
7597         * command.h: (glob var cur_proc) Move declaration here, from
7598         common.h.
7599
7600         * data-list.c: (dump_fixed_table) Fix messages.
7601         (dump_free_table) Call tab_nat_dim().
7602
7603         * descript.q: (dump_z_table) Modify tab_dim() call.
7604
7605         * frequencies.q: (dump_condensed, dump_statistics) Add tab_dim()
7606         call.
7607         (dump_statistics) Don't output header.
7608
7609         * groff-font.c: Minor format fix.
7610
7611         * html.c: Comment fix.
7612
7613         * list.q: (write_varname) Indent after advancing page.
7614
7615         * output.h: Minor reordering.
7616
7617         * postscript.c: Comment fixes.  Many places, '\n' was replaced by
7618         a reference to eol[].
7619         (struct ps_driver_ext) New member eol[].
7620         (ps_preopen_driver) Initialize eol[].
7621         (ps_postopen_driver) Fix sense of text for text_opt, line_opt
7622         defaults.  Handle headers.  Fix test for minimum page length.
7623         (static var option_tab[]) Add `line-ends'.
7624         (ps_option) Handle line-ends to change eol[].
7625         (postopen) Scale prop_em_width and fixed_width properly.  Set the
7626         prologue title to outp_title if applicable.  Replace the prologue
7627         line ends with eol[].  Call draw_headers() if headers are enabled.
7628         (text_width) New function.
7629         (out_text_plain) New function.
7630         (draw_headers) New function.
7631
7632         * print.c: (dump_table) Call tab_nat_dim().
7633
7634         * som.c: (som_blank_line) Only advance a line if not at the top of
7635         a page.
7636         (som_submit) Move several informational table calls here.
7637         Increment subtable_num if SOMF_NO_TITLE not set.
7638         (output_table) Advance a line if SOMF_NO_SPACING not set.
7639         (render_columns, render_segments, render_simple) Handle spacing
7640         between tables.  Handle table titles.  Remove debug output.
7641
7642         * som.h: (SOMF_*) New enum series.
7643         (struct som_table_class) New member `flags'.
7644
7645         * sysfile-info.c: (cmd_sysfile_info) Calls tab_nat_dim().  No
7646         headers or spacing.
7647         (display_variables) Calls tab_nat_dim().
7648         (describe_variable) Remove restriction on number of value labels.
7649         Make value labels separated by thin lines.
7650
7651         * tab.c: (tab_create) Default `flags' to none.
7652         (tab_float) New arg `w'.  All references changed.
7653         (tab_nat_dim) New function.
7654         (tab_output_text) No title or spacing.
7655         (tab_flags) New function.
7656         (tabi_flags) New function.
7657         (tabi_title) New function.
7658         (strip_height) Removed.
7659         (tabi_render) Skip title when necessary.
7660         (static var tab_tab_class) Add tabi_flags, tabi_title.
7661         (evaluate_dimensions) Disable display of column, row size.
7662         (sum_columns) Add title height to top header.
7663         (render_strip) Moved within file.
7664
7665         * tab.h: (struct tab_table) New member `flags'.
7666
7667         * vfm.c: (dump_splits) Calls tab_nat_dim().  No title.
7668
7669 Sat Jan  3 16:55:44 1998  Ben Pfaff  <blp@gnu.org>
7670
7671         * Most source files: Add `const' attribute in all appropriate
7672         places.
7673         
7674         * sysfile-info.c: (cmd_sysfile_info) Add tab_dim() call, add a
7675         column to the variables table for use by describe_variable().
7676         (cmd_display) Disable for the present.
7677         (display_documents) Don't wrap documents.
7678         (display_variables) Table has four columns now.
7679         (describe_variable) Table has four columns now.  Don't use a
7680         subtable, use joined cells instead.
7681
7682         * tab.c: (tab_create) Don't set `join'.
7683         (tab_realloc) ct array is not made up of a_string's.
7684         Reallocate trh, hrh, h arrays, initialize trh array.  Initialize
7685         cell contents on GLOBAL_DEBUGGING, not DEBUGGING.
7686         (text_format) New function.
7687         (tab_title) Rewritten, uses text_format().
7688         (tab_text) Rewritten, uses text_format().
7689         (tab_joint_text) New function.
7690         (tab_join) Removed.
7691         (static var hit) New variable.
7692         (render_strip) New args r1, r2.  Implement joined cells that fit
7693         on a single page.
7694         (tabi_render) Increment hit.  Pass new args to render_strip().
7695         (evaluate_dimensions) [GLOBAL_DEBUGGING] Check for uninitialized
7696         cells.  For t_naw and t_nah, ignore joined cells and null cells in
7697         calculations.
7698         
7699         * tab.h: (struct tab_join_rect) Removed.
7700         (struct tab_table) Removed `join'.
7701         (TAB_JOIN_MAIN) Removed.
7702         (struct tab_joined_cell) New struct.
7703         (TAT_NOWRAP) New enum.
7704
7705 Fri Jan  2 01:39:58 1998  Ben Pfaff  <blp@gnu.org>
7706
7707         * ascii.c: (ascii_postopen) Replace ASCII_* macros with their
7708         expansions.
7709         (ascii_postopen_driver) Fix initialization of *_spacing so that
7710         the TAL_0 bit doesn't count.
7711
7712         * data-list.c: (dump_fixed_table) Use natural width for Format
7713         column.
7714
7715         * glob.c: (rerange) Removed.
7716         (get_date) Formatting fixes.  Internationalization fix.
7717
7718         * html.c: (html_postopen_driver) Replace HTML_DEFAULT_OUTPUT_FILE
7719         with "pspp.html".
7720
7721         * postscript.c: (ps_postopen_driver) Replace
7722         PS_DEFAULT_OUTPUT_FILE with "pspp.ps".
7723
7724         * som.c: (som_submit) Don't eject page before every table.
7725         (output_table) Fix order of arguments on call to area().
7726         (render_columns) Fix calculation of max_len.
7727         
7728         * tab.c: (tabi_cumulate) Minor change to increase elegance.
7729         (render_strip) New function.
7730         (strip_height) New function.
7731         (tabi_render) Rewrite as calls to render_strip().
7732
7733         * tab.h: (TAT_* enums) Removed TAT_RICH, all references removed.
7734         Renumbered TAT_PRINTF, TAT_TITLE, TAT_FIX to correspond better
7735         with the TAB_* and OUTP_T_* constants.
7736         
7737 Thu Jan  1 11:53:52 1998  Ben Pfaff  <blp@gnu.org>
7738
7739         * Makefile.am: Formatting fixes.
7740
7741         * ascii.c: (ascii_postopen_driver) Initialize *_line_spacing[],
7742         *_line_width[].
7743
7744         * data-list.c: (dump_fixed_table) Add tab_dim() call.
7745
7746         * descript.q: (dump_z_table, display) Add tab_dim() calls.
7747
7748         * dump-sysfile.c: (glob var length) Make type off_t.
7749         (usage) Fix arguments.
7750         (main) Return 0.
7751
7752         * output.h: (OUTP_T_*) Change constants' value to match tab.h.
7753         Now right-justification is the default so many references had to
7754         change.
7755         (struct outp_class) Removed line_width, all references changed.
7756         (OUTP_DEV_*) Add OUTP_DEV_DISABLED.
7757         (struct outp_driver) Add elements horiz_line_width,
7758         vert_line_width, horiz_line_spacing, vert_line_spacing.  Remove
7759         som element.
7760
7761         * postscript.c: (outp_encodings) Formatting fixes.  Fix garbage
7762         collection.
7763         (postopen) Initialize all the informational members of
7764         outp_driver.
7765
7766         * som.c: (som_blank_line) New function, renamed from blank_line(),
7767         all references changed.
7768         (som_submit) Disables drivers whose pages can't be opened.
7769         (render_columns, render_simple, render_segments) Add debug output.
7770         (render_columns) Fix loop range.
7771         (render_simple) Don't try to render the headers, they're taken
7772         care of automatically.  Advance cp_y past the table when done.
7773         (render_segments) Fix loop ranges.
7774
7775         * tab.c: Initialize new members of tab_table.
7776         (tab_vline) Handle trv[]; don't set style for spacing-only lines.
7777         (tab_hline) Handle trh[]; don't set style for spacing-only lines.
7778         (tab_box) Handle trh[], trv[]; don't set style for spacing-only
7779         lines.
7780         (set_expr) Removed.
7781         (tab_dim) New function.
7782         (tab_col_width) Removed.
7783         (tab_row_height) Removed.
7784         (tab_output_text) Call tab_dim().
7785         (tabi_driver) Call evaluate_dimensions(), sum_columns().
7786         (tabi_area) Implemented.
7787         (tabi_cumulate) Implemented.
7788         (tabi_render) Partially implemented, but broken.
7789         (var tab_table_class) Made static.
7790         (evaluate_dimensions) New function.
7791         (sum_columns) New function.
7792
7793         * tab.h: (enum t_*) Now start at t_end.  New: t_ptw, t_nr, t_nc,
7794         t_nah, t_naw, t_neg, t_xch, t_dup, t_lbl, t_jnz, t_sac, t_sar,
7795         t_scr, t_srr, t_sentinel.  Removed: t_nat.
7796         (struct tab_table) New: wl, wr, ht, hb, trh, hrh, trv, wrv, dim,
7797         max_stack_height, w, h.  Removed: ce, re.
7798         (macro blank_line) Removed.
7799         (glob var zero_length) Removed.
7800
7801 Fri Dec 26 15:44:31 1997  Ben Pfaff  <blp@gnu.org>
7802
7803         * Most source files: include some of the new include files broken
7804         out of var.h.
7805         
7806         * Makefile.am: (pspp_SOURCES) Add all the new source files to the
7807         list.
7808
7809         * aggregate.c: (glob var outfile) Make static.
7810
7811         * command.c: (glob var pgm_state) Move here.
7812
7813         * common.c: (glob vars endian, second_lowest_value, pgmname,
7814         finished, curdate, cur_proc, start_interactive, history_file) Move
7815         here.
7816
7817         * descript.q: (structs dsc_z_score, descriptives_trns) Move here.
7818
7819         * file-handle.q: (glob vars files, inline_file) Move here.
7820
7821         * glob.c: Lost lots of glob vars, detailed in individual file
7822         entries.
7823         (init_glob) set_printer, set_screen were obsolete, deleted.
7824         set_cprompt has fewer spaces because pspp has fewer letters than
7825         fiasco.
7826
7827         * inpt-pgm.c: (glob vars inp_init, inp_init_size) Move here.
7828         (inp_nval) Made static.
7829
7830         * lexer.c: (glob vars token, tokval, tokstr, tokstr_size,
7831         tokstr_len, toklongstr, tokint) Move here.
7832
7833         * misc.c: Lost several vars and functions.
7834
7835         * set.q: (all the set_* variables) Move here.
7836
7837         * str.c: (strmaxcpy, strbarepadcpy, strbarepadlencpy, strpadcpy,
7838         blpstrset, strpadcmp, memrev, memrmem, cmp_str) Move here from
7839         misc.c.
7840
7841         * tab.c: (set_expr, tab_col_width, tab_row_height) New functions.
7842
7843         * tab.h: (enum series t_*) New enums.
7844         (struct tab_table) Use arena struct tag.  New members ce, re.
7845
7846         * tokens.h: Comment fixes.
7847
7848         * var.h: Move lots of enums and variables and functions and
7849         structures to other files.  Use and declare a lot more union and
7850         struct tags.  Comment fixes.  
7851
7852         * vector.c: (glob vars vec, nvec) Move here.
7853
7854         * vfm.c: (glob vars reinit_sysmis, reinit_blanks, init_zero,
7855         init_blanks, last_vfm_invocation) Move here.
7856
7857         * cases.h: New file.
7858         (struct long_vec) Move here.
7859         (vec_init, vec_clear, vec_insert, vec_delete, devector, envector)
7860         Move here.
7861
7862         * command.h: New file.
7863         (STATE_* enums) Move here.
7864         (glob var pgm_state) Move here.
7865
7866         * format.c: New file.
7867         (glob var formats) Move here.
7868         (parse_format_specifier_name, fmt_to_string,
7869         check_input_specifier, check_output_specifier,
7870         check_string_specifier, convert_fmt_ItoO, parse_format_specifier)
7871         Move here.
7872
7873         * format.h: New file.  Move functions now in format.c here.
7874         (FMT_* enums) Move here.
7875         (struct fmt_desc) Move here.
7876         (FCAT_* enums) Move here.
7877         (struct fmt_spec) Move here.
7878         (glob vars formats, fmt_parse_ignore_error) Move here.
7879
7880         * inpt-pgm.h: New file.
7881         (INP_* enums) Move here, make #defines into enums.
7882         (glob vars inp_init, inp_init_size) Move here.
7883
7884         * sort.h: New file.
7885         (glob vars v_sort, nv_sort) Move here.
7886         (sort_cases, read_sort_output) Move here.
7887
7888         * vector.h: New file.
7889         (struct vector) Move here, add struct tag.
7890         (glob vars vec, nvec) Move here.
7891         (find_vector) Move here.
7892
7893         * New file.
7894         (glob vars last_vfm_invocation, temp_case, reinit_sysmis,
7895         reinit_blanks, init_zero, init_blanks) Move here.
7896         (struct case_stream) Move here.
7897         (glob vars vfm_source, vfm_sink, vfm_memory_stream,
7898         vfm_disk_stream, sort_stream, data_list_source,
7899         input_program_source, file_type_source, get_source, n_lag) Move
7900         here.
7901         (procedure, write_case, lagged_case, compact_case, page_to_disk)
7902         Move here.
7903                 
7904 Wed Dec 24 22:40:42 1997  Ben Pfaff  <blp@gnu.org>
7905
7906         * Makefile.am: (pspp_SOURCES) Added html.c, som.c, som.h.
7907         (LDADD) Add libdcdflib.
7908
7909         * ascii.c: Comment and formatting fixes.  Almost every external
7910         function had an assert added, checking driver_open and page_open.
7911         (ascii_init_driver) Broken into ascii_preopen_driver,
7912         ascii_postopen_driver, ascii_close_driver.  Manages driver_open.
7913         (ascii_open_page) Sets page_open.
7914         (ascii_close_page) Clears page_open.
7915
7916         * html.c: Comment and formatting fixes.  Almost every external
7917         function had an assert added, checking driver_open and page_open.
7918         (html_init_driver) Broken into html_preopen_driver,
7919         html_postopen_driver, html_close_driver.  Manages driver_open.
7920         (html_open_page) Sets page_open.
7921         (html_close_page) Clears page_open.
7922         (html_submit) Disabled.
7923
7924         * lexer.c: (parse_string) Remove debugging printf.
7925
7926         * list.q: (determine_layout) Open a page if one is not yet open.
7927
7928         * output.c: Comment fixes.
7929         (add_class) Set the class member of the new list element.
7930         (parse_options) Don't handle device type.
7931         (colon_tokenize) New function.
7932         (configure_driver) New four-field format with a field for device
7933         type.  Now initialize driver_open, page_open, next, and prev
7934         fields.  Use new colon_tokenize() function.  Don't do a memory
7935         copy to replace a driver, it doesn't work; instead delete the old
7936         driver and insert a new one.
7937         (destroy_driver) Don't call som_destroy_driver().  Close the page
7938         if it's open.  Find the class in the list of classes and decrement
7939         that reference count.  Remove the driver from the global driver
7940         list.
7941         (outp_iterate_enabled_drivers) Renamed outp_drivers().  All
7942         references changed.  Rewritten.  Don't return a driver that's not
7943         enabled.
7944         (outp_eject_page) All references to som_internal_eject_page()
7945         changed to use this.  Sets cp_x to 0 as well as cp_y.
7946
7947         * output.h: (OUTP_I_* enums) Removed.
7948         (struct som_submission_form) Removed.
7949         (struct outp_class) init_driver broken into preopen_driver,
7950         postopen_driver, and close_driver.  submit changed to take a
7951         som_table argument.
7952
7953         * postscript.c: Comment and formatting fixes.  Almost every
7954         external function had an assert added, checking driver_open and
7955         page_open.
7956         (ps_init_driver) Broken into ps_preopen_driver,
7957         ps_postopen_driver, ps_close_driver.  Manages driver_open.
7958         (ps_open_page) Sets page_open.
7959         (ps_close_page) Clears page_open.
7960
7961         * som.c: New file, base implementation.
7962         
7963         * som.h: (struct som_table) Add struct tag.
7964         (enum SOM_COL_ACROSS) Removed.
7965         (SOM_ROWS, SOM_COLUMNS) New enums.
7966         (struct som_table_class) Add member `cumulate'.  Remove `segment';
7967         change `render' arguments.
7968         (struct som_point, struct som_rect) Removed.
7969         (som_submit_table) Fixed typo, should have been som_submit.
7970
7971         * sysfile-info: (describe_variable) Don't try to insert a
7972         subtable; just destroy it for now.
7973
7974         * t-test.q: Include dcdflib/cdflib.h instead of cdflib.h.  Fix
7975         references to value labels.
7976
7977         * tab.c: (tab_destroy) New function.
7978         (tab_columns) Change argument.
7979         [0] (tab_submit) Remove dead code.
7980         (tab_title) Allocate string from the table's arena.
7981         (tab_output_text) Only free the buffer if we allocated it.
7982         (tab_submit) New function.
7983         (static vars t, d) New static vars.
7984         (tabi_table, tabi_driver, tabi_count, tabi_area, tabi_columns,
7985         tabi_headers, tabi_cumulate, tabi_render) New functions.
7986         (glob var tab_table_class) New global var.
7987
7988         * tab.h: (struct tab_join_rect) Don't use a som_rect; directly
7989         encapsulate the rectangle.  All references changed.
7990         
7991 Sun Dec 21 16:18:58 1997  Ben Pfaff  <blp@gnu.org>
7992
7993         * All header files updated to use struct tags in addition to
7994         typedefs for all structures.  Don't use word `struct' in struct
7995         tags.
7996         
7997         * Makefile.am: (pspp_SOURCES) Remove html.c.
7998         (INCLUDES) Replace the lib/* includes with a single lib/ include;
7999         all references updated.
8000
8001         * command.c: (parse_cmd) Remove call to som_check_workspace.
8002         (output_line) Update to new som.
8003
8004         * data-in.c: (parse_numeric) A single dot is not an error; it is
8005         the system-missing value.
8006
8007         * data-list.c: (dump_fixed_table, dump_free_table) Update to new
8008         som.
8009
8010         * data-out.c: Added `const' as appropriate to many prototypes.
8011         (convert_E, convert_F, convert_CCx) Take double argument instead
8012         of value * argument.
8013         (convert_format_to_string) Call changed functions appropriately.
8014         Instead of modifying the caller's value for FCAT_SHIFT_DECIMAL,
8015         make a local copy of the value.
8016
8017         * descript.q: Remove custom_variables() prototype now provided by
8018         q2c.  
8019         (custom_variables) Don't increment sbc_variables, the caller does
8020         this.
8021         (dump_z_table, display) Update to new som.
8022
8023         * error.c: (vmsg) Add const to prototype.  Remove code to handle
8024         `too many errors' condition.
8025         (check_error_count) New function.
8026         (msg) Add const to prototype.
8027
8028         * filename.c: (open_file) Rewrite for elegance.
8029
8030         * frequencies.q: Remove custom_*() prototypes now provided by q2c.
8031         (dump_full, dump_condensed, dump_statistics) Update for new som.
8032
8033         * list.q: Don't include somP.h.  Change all references to
8034         som_driver_ext to refer to the new members of som_driver.  Change
8035         som_internal_eject_page() references to outp_eject_page().
8036
8037         * main.c: (parse) Rewrite for elegance.  Add call to
8038         check_error_count().
8039
8040         * output.c: (add_class, outp_list_classes, outp_configure_driver)
8041         Rewrite or revise for new outp_driver_class_list structure.
8042         (outp_iterate_enabled_drivers) Fix comparison between disabled
8043         devices and current device type.
8044         (outp_eject_page) New function.
8045
8046         * output.h: Comment fixes.
8047         (struct outp_driver) New members driver_open, page_open, cp_x,
8048         cp_y, font_height, prop_em_width, fixed_width.  Deleted members
8049         ref_count, next.
8050         (struct outp_driver_class_list) New struct.
8051         (outp_class_list) Changed to type outp_driver_class_list; all
8052         references updated.
8053
8054         * print.c: (dump_table, print_trns_proc) Updated for new som.
8055
8056         * q2c.c: (dump_vars) Simplify array subcommand code.  Declare
8057         prototypes for custom subcommands.
8058         (dump_subcommand) Always include the `else'.
8059         (dump_parser) Fix comments in output code.
8060
8061         * set.q: Reordered functions.
8062
8063         * som-frnt.c, som-high.c, som-low.c, somP.h: Removed.
8064         
8065         * som.h: Rewritten from scratch.
8066
8067         * str.h: Remove dead code.
8068
8069         * tab.c, tab.h: New files, base implementation.
8070
8071         * sysfile-info.c: (cmd_sysfile_info, describe_variable) Update to
8072         new som.
8073
8074         * t-test.q: New code from John Williams
8075         <johnr.williams@stonebow.otago.ac.nz>.  Include math.h, cdflib.h.
8076         Many many new static vars and defines.
8077         (precalc, postcalc, g_postcalc, z_postcalc, t_pairs, t_groups,
8078         groups_calc, pairs_calc, z_dev_calc, z_calc) New functions.
8079         (struct value_list) New struct.
8080         (variance, covariance, pooled_variance, oneway, pearson_r, f_sig,
8081         t_crt, t_sig, print_t_groups) New functions.
8082         (cmd_t_test) Implemented.
8083
8084         * temporary.c: (cancel_temporary) Only free the temp_dict if it's
8085         non-NULL.
8086
8087         * vfm.c: (dump_splits) Update to new som.
8088
8089 Thu Dec  4 23:02:22 1997  Ben Pfaff  <blp@gnu.org>
8090
8091         * Makefile.am: (fiasco_SOURCES) Add html.c.
8092
8093         * aggregate.c: Base source.
8094
8095         * ascii.c: (postopen, preclose) Reformat.
8096
8097         * data-out.c, expr-evl.c: Comment fixes.
8098         
8099         * filename.c: (open_file) When opening a file for writing, use
8100         line buffering instead of full buffering for better interactive
8101         performance.  Suggested by Valerio Aimale
8102         <valerio@svpop.com.dist.unige.it>.  Also, recognize special file
8103         names `stdin', `stdout', `stderr'.
8104
8105         * groff-font.c: Comment fixes.
8106
8107         * html.c: New file; base version.
8108
8109         * list.q: (write_all_headers, clean_up, determine_layout,
8110         list_cases) Ignore `special' devices for now.  Needs to be fixed
8111         later.
8112
8113         * output.c: (outp_init) Add html driver to list; reverse list
8114         order.
8115
8116         * output.h: (struct outp_class_struct) New members `special',
8117         `submit'; comment fixes.  All references changed.
8118
8119         * postscript.c: (ps_init_driver) Make defaults for text_opt,
8120         line_opt depend on whether the OUTP_DEV_SCREEN bit is set on the
8121         device.
8122         (postopen) Comment fix.
8123         (preclose) Comment fixes, formatting fixes.  Change x->file.file
8124         references to more proper f->file.
8125
8126         * som-high.c: (som_submit_table) Special classes use their own
8127         renderers.
8128
8129         * som.h: Comment fixes.
8130
8131         * temporary.c: (new_dictionary) Don't try to xstrdup() a NULL
8132         string.
8133         
8134 Tue Dec  2 14:36:07 1997  Ben Pfaff  <blp@gnu.org>
8135
8136         * Makefile.am: (fiasco_SOURCES) Add aggregate.c back in.
8137
8138         * aggregate.c: Still working on this.
8139
8140         * command.c: (cmd_table[]) Add AGGREGATE back in.
8141         (split_words) Make '-' a legal word separator as well as ' '.
8142
8143         * main.c: Comment fixes.
8144
8145         * q2c.c: (dump_parser) Don't require the procedure's full name to
8146         be present, in the generated source.
8147
8148         * t-test.q: Change name to `t-test' from `t test'.  Let PAIRS be
8149         multiply specified and let it be default; let MISSING, CRITERIA,
8150         FORMAT be multiply specified.
8151         (cmd_t_test) Parse command name.  [DEBUGGING] Call debug_print().
8152         (custom_groups) Fix defaults.
8153         (custom_pairs) Check whether this is a PAIRS subcommand before
8154         attempting to parse.  Better garbage collection.  Proper storage
8155         allocation.
8156         [DEBUGGING] (debug_print) New function.
8157
8158         * temporary.c: Comment fixes.
8159         (copy_variable) Don't copy variable name and index.
8160         (save_dictionary) Copy variable name and index by hand.
8161
8162         * vars-atr.c: Comment fixes.
8163         (create_variable) New dictionary argument.  All references
8164         changed.
8165         (common_init_stuff) New dictionary argument.  All references
8166         changed.
8167         (init_variable) New dictionary argument.  All references changed.
8168         (dup_variable) New function.
8169
8170         * vars-prs.c: (parse_variables) If there are any errors, we always
8171         return 0.  Previously, it was possible for some types of errors to
8172         be ignored.
8173         
8174 Sat Nov 22 01:20:59 1997  Ben Pfaff  <blp@gnu.org>
8175
8176         * Makefile.am: (fiasco_SOURCES) For 0.1.5 release, remove
8177         aggregate.c.
8178
8179         * command.c: (cmd_table[]) Comment out AGGREGATE; add T TEST.
8180
8181         * list.q, t-test.q: Remove ALL option from VARLIST declaration in
8182         grammar rules.
8183
8184         * q2c.c: Comment fixes.
8185         (SBC_* enums) Remove SBC_VARLIST_ALL; all references removed.
8186         
8187         * t-test.q: (cmd_list) Rename cmd_t_test.
8188
8189         * temporary.c: (new_dictionary) Don't declare as static.
8190         
8191 Fri Nov 21 00:03:06 1997  Ben Pfaff  <blp@gnu.org>
8192
8193         * aggregate.c: Changes, still not finished.
8194
8195         * file-handle.q, frequencies.q, list.q, set.q: Comment fixes.
8196
8197         * q2c.c: Comment fixes.  Now its output is internationalized.
8198         (get_token) Fix parsing of escapes within literal strings.
8199         (main) Fix bad #line directives in output.
8200
8201         * t-test.q: Base implementation.
8202
8203         * temporary.c: (new_dictionary) New function.
8204         (restore_dictionary) [__CHECKER__] Change fill character to *
8205         (from @).
8206         
8207 Sun Nov 16 01:29:57 1997  Ben Pfaff  <blp@gnu.org>
8208
8209         * Makefile.am: (BUILT_SOURCES, fiasco_SOURCES) Add t-test.c
8210
8211         * aggregate.c: Changes, still not finished.
8212
8213         * descript.q, list.q: Comment fixes.
8214
8215         * q2c.c: Almost completely rewritten.
8216
8217         * t-test.q: New file, not complete.
8218
8219 Fri Nov 14 00:14:48 1997  Ben Pfaff  <blp@gnu.org>
8220
8221         * aggregate.c: Changes, still not finished.
8222
8223         * sort.c: (sort_cases) Call cancel_temporary() instead of doing it
8224         by hand.
8225
8226         * temporary.c: (cancel_temporary) New function.
8227
8228         * vars-atr.c: (discard_variables) Call cancel_temporary() instead
8229         of doing it by hand.
8230
8231         * vfm.c: (close_active_file) After restoring a TEMPORARY
8232         dictionary, set temp_dict to NULL.  Cancel TEMPORARY through
8233         cancel_temporary().
8234         (SPLIT_FILE_procfunc) Comment fix.
8235
8236 Tue Oct 28 16:08:45 1997  Ben Pfaff  <blp@gnu.org>
8237
8238         * Makefile.am: (fiasco_SOURCES) Add aggregate.c.
8239
8240         * aggregate.c: New file, not finished yet.
8241
8242         * command.c: (cmd_table) Add AGGREGATE.
8243
8244         * common.h: (pgm_state) Move declaration to var.h.
8245
8246         * lexer.c: (bin_value_func, oct_value_func, hex_value_func) i18n
8247         fixes.
8248         (parse_string) Message fix.
8249
8250         * recode.c: Comment fix.
8251
8252         * sfm-read.c: (read_variables) Code esthetic fixes.
8253         (write_header) Default date is `Jan', not `JAN'.
8254
8255         * sfmP.h: (bswap_int32) [!__linux__] Fix off-by-one errors.
8256
8257         * sort.c: (cmd_sort_cases) Farm the work out to new function
8258         parse_sort_variables().
8259         (parse_sort_variables) New function.
8260         (sort_cases) New function.  Cancels temporary transformations,
8261         which sorting didn't do previously.
8262         (cmd_sort_cases) Better garbage collection on error.  Uses
8263         do_external_sort().
8264         (write_initial_runs, merge_once) Improved code esthetics.
8265         (sort_stream_read) Reduced to one call to read_output_cases().
8266         (read_output_cases) New function.
8267
8268         * var-labs.c: (cmd_variable_labels) Re-enabled truncation of
8269         variable labels to 120 characters.
8270
8271         * var.h: Comment fixes.
8272         (glob var pgm_state) From common.h.
8273
8274         * vars-atr.c: (discard_variables) Set pgm_state to STATE_INIT.
8275
8276         * vars-prs.c: (parse_DATA_LIST_vars) Support PV_SINGLE in
8277         options.  Set *names to NULL on error.
8278
8279         * vfm.c: (memory_stream_init) Assert compaction_nval != 0.
8280
8281 Thu Oct  9 09:59:49 1997  Ben Pfaff  <blp@gnu.org>
8282
8283         * sfm-write.c, vfm.c: [HAVE_UNISTD] #include <unistd.h>, needed by
8284         SunOS4.  From Alexandre Oliva <oliva@dcc.unicamp.br>.
8285
8286 Wed Oct  8 18:55:24 1997  Ben Pfaff  <blp@gnu.org>
8287
8288         * vfm.c: (page_to_disk) Added missing local variables.
8289
8290 Tue Oct  7 20:23:17 1997  Ben Pfaff  <blp@gnu.org>
8291
8292         * get.c: Comment fix.
8293
8294         * sort.c: (cmd_sort_cases) Attempt to perform internal sort if the
8295         source is anything other than a disk stream, not just if it's in a
8296         memory stream.  Call page_to_disk() before external sort.
8297         (allocate_cases) Message fix.
8298
8299         * vfm.c: (prepare_for_writing) Warn user when paging workspace to
8300         disk.
8301         (page_to_disk) New function.
8302
8303 Sun Oct  5 15:56:14 1997  Ben Pfaff  <blp@gnu.org>
8304
8305         * Makefile.am: (INCLUDES) Include .. instead of $(top_srcdir).
8306
8307         * common.h: (macro strerror) Remove.  From Alexandre Oliva
8308         <oliva@dcc.unicamp.br>.
8309
8310         * get.c: (dict_delete_run) The number of variables to delete is
8311         not necessarily the number of variables that need to be shifted
8312         up.
8313         (trim_dictionary) Don't set *options to 0.  Fix bug that caused
8314         too many variables to be deleted.
8315
8316         * postscript.c: Comment fix.
8317
8318         * q2c.c: Include strerror.c.  From Alexandre Oliva
8319         <oliva@dcc.unicamp.br>.
8320
8321         * set.q: #undef ON and OFF.  From Alexandre Oliva
8322         <oliva@dcc.unicamp.br>.
8323
8324         * sfm-read.c: (sfm_read_dictionary) Don't set the file class too
8325         early, otherwise errors cause a bad free().
8326
8327         * str.h: (macro nvsprintf) s/FORMATS/FORMAT/ typo.  From Alexandre
8328         Oliva <oliva@dcc.unicamp.br>.
8329
8330         * temporary.c: (save_dictionary) Don't allocate memory if
8331         n_documents is 0.
8332
8333         * vfm.c: (memory_stream_write) Message fix.
8334
8335 Sat Oct  4 16:20:43 1997  Ben Pfaff  <blp@gnu.org>
8336
8337         * command.c: (static var cmd_table[]) Define REPEATING DATA
8338         command.
8339
8340         * common.h: Added support for broken systems that are missing
8341         EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, and/or strerror().
8342
8343         * Many source files: Replace syntax error messages via msg() with
8344         call to syntax_error().
8345
8346         * data-list.c: (dump_fixed_table) Add support for dumping table
8347         for REPEATING DATA as well as DATA LIST FIXED.
8348         (cmd_repeating_data) Allows and requires `/' between subcommands.
8349         Does proper thing with allowing rpd.starts_end to stay 0.  Allows
8350         CONTINUED specifications to be omitted.  Forces CONTINUED to be
8351         specified if ID is.  Calculates starts_end, cont_end from logical
8352         record length as reported by fhp.  Calls dump_fixed_table() if
8353         requested.  Fixed length of record copied by memcpy.
8354         (parse_num_or_var) Sets `num' to 0, not NOT_INT, for variables.
8355         Message fix.
8356         (realize_value) Returns sensible value for out-of-range variable
8357         values.
8358         (rpd_parse_record) New argument `ofs'.  Fixed confusion between
8359         length of occurrences and length of line.  Added warning for
8360         fields that exceed the line length.  Fixed infinite loop.
8361         (read_one_set_of_repetitions) Numerous minor changes for more
8362         complete SPSS compliance.  Message fixes.
8363
8364         * dfm.c: (dfm_close) If the file being closed is the inline file,
8365         read all the remaining data before closing it.
8366         (dfm_get_record) Don't close the file on lossage, as either it
8367         has been closed already or it doesn't belong to us.
8368
8369         * error.c: (puts_stdout) New function.
8370         (vmsg) Use puts_stdout instead of puts.
8371
8372         * file-handle.q: (fh_record_width) New function.
8373
8374         * inpt-pgm.c: (init_case) Fixed buffer overrun when inp_nval % 4
8375         == 0.
8376         (clear_case) Ditto.
8377         (input_program_source_read) Made an old kluge an approved method.
8378
8379         * lexer.c: (syntax_error) New function.
8380
8381         * misc.c: [BROKEN_RAND] (ansi_rand, ansi_srand; static var next)
8382         New.
8383
8384         * output.c: (oupt_get_paper_size) Message fix.
8385
8386         * q2c.c: Numerous fixes to formatting of generated code made to
8387         conform to GNU coding standards.  Uses syntax_error() in generated
8388         code.  Other miscellaneous generated message fixes.  Added support
8389         for broken systems that are missing EXIT_SUCCESS, EXIT_FAILURE,
8390         RAND_MAX, and/or strerror().
8391
8392 Sat Oct  4 02:09:56 1997  Ben Pfaff  <blp@gnu.org>
8393
8394         * data-in.c: Comment fixes.
8395
8396         * data-list.c: (struct repeating_data_trns) New member `id_spec'.
8397         (find_variable_input_spec) New function.
8398         (cmd_repeating_data) Initializes id_spec.
8399         (rpd_parse_record) Implemented.
8400         (read_one_set_of_repetitions) Returns -3 by default in order to
8401         kluge out some potential bugs.
8402
8403         * data-out.c: Comment fixes.
8404
8405         * file-type.c: (internal_cmd_record_type) Message fix.
8406
8407         * inpt-pgm.c: (input_program_source_read) Special temporary kluge
8408         for handling -3 return value.
8409
8410 Sat Sep 20 23:58:15 1997  Ben Pfaff  <blp@gnu.org>
8411
8412         * data-list.c: Comment fixes.
8413         (struct dls_var_spec) Reordered members.
8414         (read_from_data_list_fixed) Restructured.
8415         (struct repeating_data_trns) Reordered members.  Renamed `starts'
8416         as `starts_beg', `ends' as `starts_end'.
8417         (cmd_repeating_data) Calculates length of repeated data if
8418         necessary and possible.
8419         (parse_num_or_var) Don't allow string variables.
8420         (realize_value) New function.
8421         (rpd_msg) New function.
8422         (rpd_parse_record) New function.  Currently stubbed out.
8423         (read_one_set_of_repetitions) Implemented.
8424
8425         * inpt-pgm.c: (input_program_source_read) Comment fix.
8426
8427 Thu Sep 18 21:34:57 1997  Ben Pfaff  <blp@gnu.org>
8428
8429         * command.c: (cmd_end_repeat_p) Removed.
8430         (init_cmd_parser) Doesn't set cmd_end_repeat_p.
8431         (parse_cmd_name) Removed.
8432
8433         * data-list.c: Comment fixes.
8434         (data_list_pgm) Removed `eof' member.
8435         (static var first) New var.
8436         (cmd_data_list) Sets `first'.  Ensures that DATA LIST uses the
8437         FILE TYPE file inside FILE TYPE structures.
8438         (append_var_spec) Appends to *first, not dls.spec.
8439         (parse_fixed) Message fixes.
8440         (struct rpd_num_or_var) New.
8441         (struct repeating_data_trns) New.
8442         (static var rpd) New.
8443         (cmd_repeating_data) New function.
8444         (parse_num_or_var) New function.
8445         (parse_repeating_data) New function.
8446         (read_one_set_of_repetitions) New function.
8447
8448         * file-type.c: (cmd_file_type) Message fixes.  Always
8449         default_handle to FILE TYPE file handle.
8450         (internal_cmd_record_type) Message fixes.
8451
8452 Wed Aug 20 14:22:03 1997  Ben Pfaff  <blp@gnu.org>
8453
8454         * repeat.c: Comment fix.  Disable debugging.
8455
8456         * temporary.c: (restore_dictionary) Sets splits to NULL and
8457         n_splits to 0 before destroying the variables because now doing
8458         this tries to remove split variables.
8459
8460         * vars-atr.c: (discard_variables) Asserts that n_splits is 0 after
8461         destroying the dictionary.
8462         (clear_variable) Removes a variable from splits after destroying
8463         it.
8464
8465 Mon Aug 18 18:06:55 1997  Ben Pfaff  <blp@gnu.org>
8466
8467         * cmdline.c: (set_compat) Removed.
8468         (pick_compat) Removed.
8469         (parse_command_line) Removed -c option.
8470         (pre_syntax_message) Removed -c option.
8471         (usage) Remove compatibility code.
8472
8473         * common.h: (macros VER_PC, VER_WND, VER_X) Removed.
8474         (glob var compat) Removed.
8475
8476         * compute.c: (type_check) Fixed messages about type mismatches.
8477
8478         * data-list.c: (cmd_data_list) Removed compatibility code.
8479         (fixed_parse_compatible) Calls convert_negative_to_dash().
8480         Fixed bug where it only set the variable in fx.spec if it created
8481         the variable itself.
8482         (dump_fmt_list) Spelling fix.
8483         (cut_field) Removed compatibility code.
8484
8485         * dfm.c: (cmd_begin_data) Don't require a command terminator on
8486         BEGIN DATA command.
8487
8488         * expr-evl.c: (evaluate_expression) Implement LAG.
8489
8490         * expr-prs.c: (parse_add) Calls convert_negative_to_dash().
8491         (parse_neg) Calls convert_negative_to_dash().
8492         (LAG_func) Increases n_lag to the lag requested.  Fixed assignment
8493         bug.
8494
8495         * expr.h: (struct expression_struct) Removed member max_lag.
8496
8497         * file-type.c: (parse_col_spec) Calls convert_negative_to_dash().
8498         (internal_cmd_record_type) Removed special handling to produce
8499         negative numbers from dash tokens.
8500
8501         * getline.c: (static var DO_REPEAT_level) New var.
8502         (getl_add_DO_REPEAT_file) Increments DO_REPEAT_level.
8503         (handle_line_buffer) Copies the line into getl_buf; doesn't call
8504         copy_with_DO_REPEAT_substitutions().
8505         (getl_read_line) Maintains value of getl_mode.  Calls
8506         perform_DO_REPEAT_substitutions() whenever DO_REPEAT_level is
8507         positive.
8508         (getl_close_file) Decrements DO_REPEAT_level when appropriate.
8509
8510         * getline.h: (getl_mode) New glob var.
8511
8512         * glob.c: Comment fixes.
8513         (init_glob) Restructured.  Sets set_seed.
8514         (init_compat_dependent) Removed.  All references removed.
8515         (get_date) Format changed from MM/DD/YY to DD MMM YYYY.
8516         (__htonl, __htons) Removed.  (What were these for?)
8517
8518         * lexer.c: (static var tbl) Dash set to class CNUM.
8519         (make_hexit) New function from data-out.c.
8520         (get_token_representation) Rewritten.
8521         (convert_negative_to_dash) New function.
8522         (lex_init_compat_dependent) Removed.
8523         (yylex) A dash is parsed as part of a number if it is followed by
8524         a digit.  The ASCII representation of a number is copied to
8525         tokstr.  String parsing farmed out to parse_string().  Comment
8526         fixes.
8527         (bin_value_func, oct_value_func, hex_value_func, parse_string) New
8528         functions.
8529         (preprocess_line) Line processing depends on interactive/batch
8530         mode, not on compatibility mode.  Removed PC+ compatibility code.
8531
8532         * loop.c: (loop_3_trns_proc) Comment fix.
8533
8534         * main.c: Remove dead code.
8535         (main) Remove call to init_compat_dependent().
8536
8537         * misc.c: (convert_fmt_ItoO) Make E format conversion more
8538         conformant.
8539
8540         * print.c: (parse_string_argument) Calls
8541         convert_negative_to_dash().
8542         (fixed_parse_compatible) Calls convert_negative_to_dash().
8543
8544         * repeat.c: (RPT_* defines) Removed.
8545         (struct rpt_numeric) Removed.
8546         (struct repeat_entry) New member type, changed `replacement' from
8547         char * to char **.
8548         (clean_up) Deallocation adapted to new repeat_entry.
8549         (internal_cmd_do_repeat) `type' defaults to 0.  Remove lookahead()
8550         usage.  Creates vars for `type' of 1.
8551         (parse_ids) Sets type of 1.  Adapted to new repeat_entry.
8552         (store_numeric) Rewritten, new interface.
8553         (parse_numbers) Rewritten.
8554         (parse_strings) Rewritten.
8555         (find_DO_REPEAT_substitution) New function.
8556         (perform_DO_REPEAT_substitutions) New function.
8557         (copy_with_DO_REPEAT_substitutions) Removed.
8558         (debug_print) Rewritten.
8559
8560         * set.q: Comment fix.
8561         (custom_results) Removed compatibility code.
8562         (internal_cmd_set) Removed SET EMULATION subcommand.  Removed
8563         compatibility code.
8564
8565         * sysfile-info.c: (cmd_display) Removed compatibility code.
8566
8567         * tokens.h: Comment fixes.
8568         (token types enum) Removed `toktype' typedef name for this int
8569         type.  Removed SUBST.  Restructured.
8570
8571         * vars-atr.c: (discard_variables) Sets n_lag to 0.
8572
8573         * vars-prs.c: Comment fix.
8574
8575         * vfm.c: Comment fixes.
8576         (glob var n_lag) New var.
8577         (static vars lag_count, lag_head, lag_queue) New vars.
8578         (procedure) Removed argument nlag.
8579         (setup_lag) New function.
8580         (close_active_file) Discards lagging state.
8581         (lag_case) New function.
8582         (lagged_case) New function.
8583         (write_case) Lags a case if lagging.
8584
8585         * weight.c: (cmd_weight) Removed compatibility code.
8586         
8587 Sun Aug 17 22:34:40 1997  Ben Pfaff  <blp@gnu.org>
8588
8589         * getline.h: (struct getl_script) New members loop_index, macros.
8590
8591         * getline.c: (getl_add_file) Sets first_line field to NULL.
8592         (getl_add_DO_REPEAT_file) New function.
8593         (handle_line_buffer) When the current line's length is negative,
8594         set the filename and line number.  Increment line number after
8595         reading line.  Pass the line to
8596         copy_with_DO_REPEAT_substitutions() for processing.
8597         (getl_close_file) Free DO REPEAT lines before freeing the
8598         filename, and just set the filename to NULL when doing this,
8599         because otherwise the filename gets freed twice.
8600
8601         * glob.c: (glob var queuing) Removed.  All references removed.
8602
8603         * lexer.c: Comment fixes.
8604         (get_token_representation) New function.
8605
8606         * repeat.c: Comment fixes.
8607         (struct repeat_entry) Replaced type and v union members with a
8608         simple string.
8609         (append_record) New function.
8610         (internal_cmd_do_repeat) Started reforming it for the new
8611         repeat_entry struct.  Properly records filename changes in the
8612         getl_line_buf.  Fixed improper use of = for ==.  Fixed sense of
8613         strncasecmp() result usage.  Uses append_record() to simplify.
8614         Properly discards END REPEAT line.  Calls getl_add_DO_REPEAT_file
8615         to add in the file.
8616
8617         (copy_with_DO_REPEAT_substitutions) Started coding.
8618
8619         [DEBUGGING] (debug_print_lines) New function.
8620
8621         * set.q: (custom_results, internal_cmd_set) s/VER_PCP40/VER_PC/;
8622
8623         * tokens.h: (macro is_id1, is_idn) New macros.
8624
8625 Sat Aug 16 10:57:41 1997  Ben Pfaff  <blp@gnu.org>
8626
8627         * cmdline.c: (static var pre_syntax_message) Changed `win'
8628         compatibility mode to `wnd'.
8629
8630         * data-list.c: (fixed_parse_spss) Renamed
8631         fixed_parse_compatible().
8632
8633         * glob.c: (init_glob) Excise unused code for
8634         program_invocation_short_name.
8635
8636         * lexer.c: (preprocess_line) Leading indentors are ignored in Wnd
8637         as well as in X.
8638
8639         * print.c: (fixed_parse_spss) Renamed fixed_parse_compatible().
8640
8641         * set.q: `win' compatibility renamed `wnd'.
8642
8643 Thu Aug 14 22:11:12 1997  Ben Pfaff  <blp@gnu.org>
8644
8645         * filename.c: [__WIN32__] Change the included Windows header files
8646         (again).
8647         (absolute_filename_p) [__MSDOS__] A filename with a colon as the
8648         second character is absolute.
8649         (dirname) Fix logic error.  Don't printf() the results.
8650         (prepend_dir) Don't printf() the results.
8651
8652         * getline.c: (handle_line_buffer) New function.
8653         (getl_read_line) Reads line with handle_line_buffer() when
8654         appropriate.
8655         (getl_close_file) Discard line buffer data.
8656
8657         * getline.h: Comment fixes.
8658         (struct getl_line_list) New struct.
8659         (getl_script_struct) Added line buffer members.  These are hooks
8660         for use by DO REPEAT to allow it to insert virtual source code
8661         into the program.
8662
8663         * glob.c: (init_glob) [__DJGPP__ || (__WIN32__ && __BORLANDC__)]
8664         Override Borland C++ stupidity that claims Windows has a console
8665         window size of 0x3.
8666
8667         * repeat.c: This is in the process of being restructured from
8668         using a token-buffering approach to the DO REPEAT facility to
8669         using the more flexible approach of a line-buffering approach in
8670         conjunction with the getline module.  Comment fixes.
8671         (struct tok_struct) Removed.
8672         (static vars queue_index, queue_head, queue) Removed.
8673         (static vars line_buf_head, line_buf_tail) New vars.
8674         (internal_cmd_do_repeat) Instead of queuing tokens, queue lines.
8675         Not complete.
8676         (pull_queue, destroy_queue) Removed.
8677         [DEBUGGING] (debug_print_tokens) Removed.
8678
8679 Tue Aug  5 13:57:58 1997  Ben Pfaff  <blp@gnu.org>
8680
8681         * file-handle.q: (prepend_current_directory) New function.
8682         (internal_cmd_file_handle, fh_get_handle_by_filename) Prepends
8683         current directory before normalizing filename.
8684
8685         * filename.c: (gnu_getcwd) New function.
8686         (absolute_filename_p) New function.
8687         (search_path) New argument, PREPEND.  All references changed to
8688         pass NULL except those explicitly mentioned.  Uses
8689         absolute_filename_p().  Prepends PREPEND before trying the
8690         filename.
8691         (dirname, prepend_dir) New functions.
8692
8693         * getline.c: (getl_get_current_directory) New function.
8694         (getl_include) Passes getl_get_current_directory() as PREPEND arg
8695         to search_path().
8696                 
8697 Sun Aug  3 11:42:36 1997  Ben Pfaff  <blp@gnu.org>
8698
8699         * In several source files, the term `script' was replaced with
8700         `syntax file' inside error messages.  Usage of the term `script'
8701         in the sense of a syntax file is now deprecated.
8702
8703         * cmdline.c: (static vars pre_syntax_message, post_syntax_message)
8704         Updated messages.
8705
8706         * dump-sysfile.c: (usage) Update message.
8707
8708         * getline.c: (getl_read_line) Ignore lines beginning with `#!'.
8709
8710         * getline.h: (glob var getl_include_path) Declare extern.
8711
8712         * list.q: Define EXTERN as extern before #including somP.h.
8713
8714         * var.h: Remove declaration of `disptype' variable.
8715
8716         * vfm.c: (close_active_file) After switching the data sink to a
8717         data source, set vfm_sink to NULL, because it doesn't exist any
8718         more.
8719
8720 Thu Jul 17 21:41:44 1997  Ben Pfaff  <blp@gnu.org>
8721
8722         * glob.c: [__BORLANDC__] Include math.h.  Define _matherr() and
8723         _matherrl() to ignore all math errors.
8724
8725         * sfm-read.c: (read_value_labels) When reading the labels from
8726         disk, read the little parts separately instead of as a struct;
8727         this avoids alignment problems.
8728
8729         * sfm-write.c: (struct sfm_fhuser_ext) New member `elem_type'.
8730         (sfm_write_dictionary) Sets elem_type and frees it on lossage.
8731         (write_header) Allocates and initializes elem_type.
8732         (sfm_write_case) Uses elem_type to determine how to handle each
8733         flt64 element.
8734         (sfm_close) Frees elem_type.
8735
8736         * sfmP.h: Comment fix.
8737         [__BORLANDC__] Uses #pragma -a to adjust structure member
8738         alignment.
8739         
8740 Thu Jul 17 01:55:12 1997  Ben Pfaff  <blp@gnu.org>
8741
8742         * Makefile.am: (fiasco_SOURCES) Remove display.c.
8743
8744         * common.c: Fix typo.
8745
8746         * dfm.c: (read_record) Remove strncasecmp() emulation and fix the
8747         sense of the condition.
8748
8749         * expr-evl.c: (macro ALLOC_STRING_SPACE) [!PAGED_STACK] Add
8750         line-continuation backslash.
8751
8752         * filename.c: [__WIN32__] Include <windef.h> before <winbase.h>.
8753
8754         * frequencies.q: (custom_grouped, add_percentile) Don't use a
8755         non-constant expression as an argument to sizeof.
8756
8757         * glob.c: [__WIN32__ && __BORLANDC__] When including <conio.h>,
8758         undefine gettext macro because that's a conio function.
8759
8760         * hash.h: (hsh_prime_tab declaration) Remove.
8761
8762         * list.q: (write_fallback_headers) Move `leader' allocation out of
8763         main loop.  Change to local_alloc() allocation.
8764
8765         * output.h: Formatting fixes.  Put __attribute__ in right place on
8766         function prototypes.
8767
8768         * sfm-read.c: (read_machine_flt64_info, read_variables) Change
8769         incorrect `SECOND_LOWEST_VALUE' references to proper
8770         `second_lowest_value'.
8771
8772         * som-frnt.c: (EXTERN macro) Define as `extern' instead of null
8773         value.  This way 2 out of 3 of the som files define the vars
8774         extern, the correct way, that actually works under BC++.
8775         (som_set_float) Don't use nonconstant initializers for a struct.
8776
8777         * som-high.c: Add the standard alloca() header.
8778         (replicate_table) Add prototype.
8779
8780         Merged DISPLAY routine.
8781         * sysfile-info.c: (AS_*) New enum series.
8782         (cmd_sysfile_info) Gutted.  Calls describe_variable() to do the
8783         dirty work.
8784         (cmd_display, display_macros, display_documents,
8785         display_variables) Stolen from defunct display.c.
8786         (describe_variable) New function.
8787
8788         * temporary.c: [0] (display_tree) New debug function.
8789         (copy_variable) Performs shallow copy of value labels instead of
8790         deep copy; i.e., just copys the AVL tree and increments the
8791         reference counts.
8792
8793         * val-labs.c: Comment fixes.
8794         (do_value_labels) Optionally skip leading forward slash.
8795         (get_label) Creates only a single value label instead of many
8796         copies of one, and sets the reference count.
8797
8798         * display.c: Removed.
8799
8800         * dump-sysfile.c: New file, not yet complete.
8801
8802 Fri Jul 11 23:02:18 1997  Ben Pfaff  <blp@gnu.org>
8803
8804         For lots of source files I added more verbose_msg's.  These aren't
8805         listed below as they have tested as being benign.  In some cases
8806         these replaced debug_printf() calls.
8807
8808         * output.c: (outp_read_devices) Message fix.
8809
8810         * postscript.c: (output_encodings) Message fix.  Reports errors on
8811         fclose().
8812         (postopen) Message fix.
8813         
8814 Fri Jul 11 14:09:40 1997  Ben Pfaff  <blp@gnu.org>
8815
8816         * dfm.c: (dfm_close) Don't call fclose() for a NULL FILE.
8817
8818         * filename.c: (close_file_ext) Set f->file to NULL *after* closing
8819         it.
8820
8821         * main.c: Remove <malloc.h> #include.
8822
8823         * mis-val.c: (parse_numeric) Set .f member for each missing[]
8824         instead of trying to just set the missing[] itself, which is a
8825         gcc-specific idiom.
8826
8827         * sfm-read.c: (read_variables) Same.
8828
8829         * str.h: Add memmem() prototype.
8830
8831         * val-labs.c, var-labs.c: Replace <malloc.h> with <stdlib.h>.
8832
8833 Thu Jul 10 22:13:53 1997  Ben Pfaff  <blp@gnu.org>
8834
8835         * Makefile.am: (q2c) Don't include any libraries in the link.
8836
8837         * dfm.c: (force_line_buffer_extension) New macro.
8838         (count_tabs) New function.
8839         (tabs_To_spaces) New function.
8840         (read_record) Calls tabs_to_spaces() on the line being processed.
8841
8842         * q2c.c: Disabled i18n for this proglet so that libintl.a doesn't
8843         have to be compiled twice (once for CC, once for LOCAL_CC).
8844  
8845 Sun Jul  6 19:14:33 1997  Ben Pfaff  <blp@gnu.org>
8846
8847         * Makefile.am: (INCLUDES) Add intl directory; fix directories.
8848         (LDADD) Add @INTLLIBS@.
8849         (q2c) Add LIBS, @INTLLIBS@ to link step.
8850
8851         * inpt-pgm.c: Turn off debugging.
8852
8853         * postscript.c: (postopen) Format fix.  local_free() blocks
8854         returned by local_alloc(); don't free() them.
8855
8856 Sat Jul  5 23:44:51 1997  Ben Pfaff  <blp@gnu.org>
8857
8858         * data-in.c: (parse_string_as_format) Comment fix.  Fix check for
8859         string length.
8860
8861         * data-list.c: (read_from_data_list_fixed) Pass proper value for
8862         LEN arg, not simply the full string length.
8863
8864         * sort.c: (allocate_file_handles) Check SPSS compatible temp file
8865         directories before generic temp file directories.
8866
8867         * vfm.c: Disable debugging.
8868
8869 Fri Jul  4 13:26:41 1997  Ben Pfaff  <blp@gnu.org>
8870
8871         * get.c: Comment fix.
8872         (cmd_save_internal) Always passes GTSV_OPT_SAVE option.
8873
8874 Wed Jun 25 22:52:28 1997  Ben Pfaff  <blp@gnu.org>
8875
8876         * expr-prs.c: (debug_print_postfix) Conditionally included on
8877         GLOBAL_DEBUGGING.  Removed out_header() reference.
8878
8879         * exprP.h: Removed #undef GLOBAL_DEBUGGING.
8880
8881 Sun Jun 22 22:00:28 1997  Ben Pfaff  <blp@gnu.org>
8882
8883         * ascii.c: Removed obsolete ascii_close_page() prototype.
8884
8885         * command.c: (output_line) Comment fix.
8886
8887         * data-in.c: Formatting fix.
8888         (parse_string_as_format) Now the `fc' argument is used only for
8889         the purpose of error messages; it is not an index into the string
8890         passed.  All references changed.
8891
8892         * data-list.c: Comment fix.
8893         (cut_field) Comment fix.  Now returns the column number of the
8894         position of the field cut out on success.
8895         (parse_field) Added `column' argument.  Puts the column numbers in
8896         the error message.
8897         (read_from_data_list_free, read_from_data_list_list) Record the
8898         column number returned by cut_field(), pass it to parse_field().
8899
8900         * dfm.c: Comment fix.
8901
8902         * do-ifP.h: Comment fix.
8903
8904         * expr-prs.c: (SYSMIS_func) Implemented string-type arguments for
8905         the SYSMIS function.
8906
8907         * expr.h, exprP.h: Comment fix.
8908
8909         * glob.c: (init_glob) Only calls setlocale() and family if
8910         ENABLE_NLS set.
8911
8912         * hash.h: Comment fix.
8913
8914         * include.c: Comment fix.
8915
8916         * output.c: Comment fix.
8917
8918         * postscript.c: (ps_line_intersection) Simplified assertion.
8919
8920         * repeat.c: Comment fix.
8921
8922         * vars-atr.c: Comment fix.
8923
8924         * vars-prs.c: Comment fix.
8925
8926         * vfm.c: (vector_initialization) [DEBUGGING] Fixed undefined
8927         behavior with usage of postincrement.
8928         (memory_stream_read) Discards cases as it goes. 
8929
8930 Sun Jun 15 16:45:17 1997  Ben Pfaff  <blp@gnu.org>
8931
8932         * Makefile.am: Cleans q2c, not just distcleans it.  Distcleans
8933         foo.
8934
8935         * Most source files: Includes debug-print.h, related comment
8936         fixes.
8937
8938         * cases.c: (alloc_val) Removed complex allocation code.  Merely
8939         increments default_dict.nval and returns the former value.
8940         (envector, devector) Removed references to lv member of struct
8941         variable.
8942
8943         * common.h: (macro VME) Replaced complex definition with simple
8944         one.
8945
8946         * data-list.c: (cmd_data_list) Sets vfm_source instead of
8947         read_active_file and cancel_input_pgm.
8948         (read_from_data_list, cancel_data_list) Removed.
8949         (data_list_source_read, data_list_source_destroy_source) New
8950         functions.
8951         (glob var data_list_source) New var.
8952
8953         * dfm.c: (open_file_r, open_file_w) Simplified debug output.
8954         (cmd_begin_data) Improved criteria for an input program accessing
8955         the inline file.  Still not perfect.
8956
8957         * do-if.c: (do_if_trns_proc) Simplified debug output.
8958
8959         * expr-prs.c: Comment fixes.
8960         [DEBUGGING] (debug_print_postfix) Simplified debug output.
8961
8962         * file-handle.q: (fh_close_handle) Simplified debug output.
8963
8964         * file-type.c: Comment fixes.
8965         (cmd_file_type) Sets vfm_source instead of read_active_file and
8966         cancel_input_pgm.
8967         (cmd_end_file_type) On failure, discards variables in place of
8968         just canceling the input program.
8969         (read_from_file_type) Renamed file_type_source_read.
8970         (cancel_file_type) Renamed file_type_source_destroy_source.
8971         (glob var file_type_source) New var.
8972
8973         * get.c: (GTSV_* enum series) New enums GTSV_OPT_SAVE, GTSV_NONE.
8974         (cmd_get) Initializes options to GTSV_NONE before passing to
8975         trim_dictionary().  Removed `lv' reference.  Sets vfm_source
8976         instead of read_active_file and cancel_input_pgm.
8977         (cmd_save_internal) Initializes options before passing to
8978         trim_dictionary().  Local var `nval' removed.
8979         (dict_delete_run) Comment fixes.
8980         (trim_dictionary) Comment fixes.  Disallows scratch variables if
8981         GTSV_OPT_SAVE set in options.
8982         (read_from_get) Renamed get_source_read.
8983         (cancel_get) Renamed get_source_destroy_source.
8984         (glob var get_source) New var.
8985
8986         * inpt-pgm.c: (cmd_input_program) Sets vfm_source instead of
8987         read_active_file and cancel_input_pgm.
8988         (read_from_input_program) Renamed input_program_source_read.
8989         Simplified debug output.
8990         (cancel_input_program) Renamed
8991         input_program_source_destroy_source.
8992         (glob var input_program_source) New var.
8993
8994         * loop.c: (loop_1_trns_proc) Simplified debug output.
8995
8996         * main.c: (dump_token) Made eof output more explicit.
8997
8998         * sfm-read.c: (read_variables, dump_dictionary) Removed `lv'
8999         references.
9000
9001         * sort.c: (cmd_sort_cases) Disallows scratch variables.  Removed
9002         code for always-memory or always-disk cases.  malloc's case-list
9003         based on vfm_source_info.ncases.  Explicit support for
9004         memory_stream via memory_source_cases.
9005         (do_external_sort) Sets vfm_source instead of read_active_file and
9006         cancel_input_pgm.
9007         (allocate_file_handles) The temporary directory permissions are
9008         set to 0700 instead of 0777.
9009         (allocate_cases) Formatting fixes.  Simplified debug output.
9010         (output_record) Compacts the case if necessary before writing it
9011         out.
9012         (close_handle, open_handle_w) Simplified debug output.
9013         (write_initial_runs) Destroys vfm_sink, then sets it to
9014         sort_stream.  Writes records to memory based on
9015         vfm_sink_info.case_size.
9016         (write_to_sort_cases) Renamed sort_stream_write().
9017         (merge) Simplified error handling.  Simplified debug output.
9018         Formatting fixes.
9019         (read_from_external_sort) Renamed sort_stream_read().
9020         Reads records based on vfm_source_info.case_size.
9021         (sort_stream_write) Writes records to memory based on
9022         vfm_sink_info.case_size.
9023         (sort_stream_mode) New function.
9024         (glob var sort_stream) New variable.
9025
9026         * temporary.c: (cmd_temporary) Simplified debug output.
9027         (copy_variable) Removed references to `lv'.
9028
9029         * title.c: (get_title) Simplified debug output.
9030
9031         * var.h: Comment fixes.
9032         (struct get_proc) Removed member `lv'.
9033         (struct variable) Removed member `lv'.  Comment fixes.
9034         (glob vars read_active_file, write_active_file, cancel_input_pgm)
9035         Removed.
9036         (struct case_stream) New.
9037
9038         * vars-atr.c: (discard_variables) Changed cancel_input_pgm,
9039         read_active_file references to use vfm_source.
9040         (init_variable, replace_variable) Removed references to `lv'.
9041
9042         * vfm.c: Comment fixes.
9043         (glob var vfm_source, vfm_sink, vfm_source_info, vfm_sink_info)
9044         New variables.
9045         (static var queue, qh, qt, n_lag) Removed.  All references
9046         removed.
9047         (glob var compaction_necessary, compaction_nval, compaction_case,
9048         paging) New variables.
9049         (record_case) Removed.
9050         (procedure) Comment fixes.  Calls vfm_source->read() instead of
9051         read_active_file().
9052         (lag) Removed.
9053         (prepare_for_writing, arrange_compaction, make_temp_case,
9054         vector_initialization, setup_filter) New function.
9055         (open_active_file) Most of the code moved into the abovementioned
9056         new functions.  Now sets temp_dict to &default_dict if there is no
9057         temporary dictionary, for convenience.  New debug output.
9058         (close_active_file) Deals with changing the sink to the source.
9059         Calls finish_compaction().  Frees compaction_case.  Mostly
9060         rewritten.
9061         (glob vars disk_source_file, disk_sink_file) New vars.
9062         (destroy_active_file, read_from_memory) Removed.
9063         (disk_stream_init, disk_stream_read, disk_stream_write,
9064         disk_stream_mode, disk_stream_destroy_source,
9065         disk_stream_destroy_sink) New functions.
9066         (glob var vfm_disk_stream) New var.
9067         (glob vars memory_source_cases, memory_sink_cases,
9068         memory_sink_iter, memory_sink_max_cases) New vars.
9069         (memory_stream_init, memory_stream_read, memory_stream_write,
9070         memory_stream_mode, memory_stream_destroy_source,
9071         memory_stream_destroy_sink) New functions.
9072         (glob var vfm_memory_stream) New var.
9073         (write_case) Local var `i' renamed `cur_trns'; local var `retval'
9074         named `more_cases'.  Simplified debug output.  Otherwise mostly
9075         rewritten.
9076         (record_case) Moved into the stream drivers.  Removed.
9077         (transform) Removed (was dead code).
9078         (SPLIT_FILE_procfunc) s/vfm_replacement/vfm_sink_info/.  In the
9079         common case that the splits don't change, we don't need to copy
9080         the case into prev_case again--pointless.
9081         (compact_case) New function.
9082         (finish_compaction) New function.
9083
9084         * vfmP.h: Comment fixes.
9085         (DEV_* enum series) Removed. 
9086         (struct storage) Renamed `stream_info'.  Removed variant record.
9087         Removed `device' member.
9088
9089         * debug-print.h: New file.
9090         
9091 Sun Jun  8 01:12:38 1997  Ben Pfaff  <blp@gnu.org>
9092
9093         * autorecode.c: Turned off debugging.
9094
9095         * data-list.c: (destroy_dls) Closes the associated file handle.
9096
9097         * descript.q: (custom_variables) Added PV_NO_SCRATCH to
9098         parse_variables() options.
9099
9100         * dfm.c: (open_file_r) Removed gratuituous argument to msg() call.
9101
9102         * display.c: (display_variables) Really fixed null cell bug.
9103
9104         * file-handle.q: (fh_close_handle) Changed debugging message.
9105
9106         * frequencies.q: (custom_variables) Added PV_NO_SCRATCH to
9107         parse_variables() options.
9108
9109         * list.q: Added PV_NO_SCRATCH in q2c varlist options.
9110         (cmd_list) Fails if no variables specified.
9111         (determine_layout) Writes blank lines manually.
9112
9113         * loop.c: (loop_1_trns_proc) Made debugging code only print
9114         messages if debugging.
9115
9116         * q2c.c: (dump_subcommand) Appends sbc->message to SBC_VARLIST
9117         parse_variables() arguments.
9118         (main) Parses optional parenthesized options to varlist
9119         subcommands into sbc->message.
9120
9121         * sfm-read.c: Format fix.
9122
9123         * var.h: (FV_*) New enum series.
9124         (PV_*) New enum PV_NO_SCRATCH.
9125
9126         * vars-prs.c: (find_var) Removed.
9127         (fill_all_vars) Takes FV_* enum instead of boolean third
9128         argument.  Rewritten to deal with scratch as well as system
9129         variables.
9130         (parse_variables) Error message on scratch variable if
9131         PV_NO_SCRATCH set.
9132
9133         * vfm.c: (static var virt_begin_func) New var.
9134         (procedure) Sets up virt_begin_func.
9135         (SPLIT_FILE_procfunc) For the first case, calls virt_begin_func()
9136         after dump_splits().  For succeeding groups changes, calls
9137         virt_begin_func() instead of begin_func().      
9138
9139 Fri Jun  6 22:42:23 1997  Ben Pfaff  <blp@gnu.org>
9140
9141         * count.c, data-out.c, file-handle.q, list.q, loop.c: Turned off
9142         debugging.
9143
9144         * dfm.c: Added some debugging messages, disabled by default.
9145         (open_file_r) Fixed error message.
9146         (read_record) On eof on inline_file, instead of calling
9147         fh_close_handle(), simply jump to eof label like a normal file.
9148         Message fixes.
9149
9150         * display.c: Thin lines between rows for certain kinds of
9151         listing.  Fixed `null cell' bug.
9152
9153         * error.c: (failure) Flush stdout, stderr before failing.
9154
9155         * file-handle.q: (fh_close_handle) Added debugging message.
9156
9157         * frequencies.q: (dump_full) Bottom line extends across entire
9158         table width.  Changed title formatting.
9159         (dump_condensed) Changed title formatting.
9160         (dump_statistics) Fixed title formatting.
9161
9162         * glob.c: (init_glob) Moved initialization of cur_proc out of #if.
9163         Sets default value of set_format.
9164
9165         * list.q: (cmd_list) Calls blank_line() before determine_layout().
9166         Passes write_all_headers() to procedure() as pre-group func.
9167         (write_all_headers) New function.
9168         (determine_layout) Removed calls to write_header().
9169         Calls blank_line() before and after write_fallback_headers().
9170
9171         * recode.c: (recode_trns_free) Only attempts to free head->map if
9172         non-NULL.
9173
9174         * sfm-read.c: (read_variables) Allows `#' at beginning of system
9175         file variable names but gives a warning.  Sets `left' based on
9176         first character being/not being `#'.  On lossage frees dict->var.
9177
9178         * som-high.c: (som_draw_title) Simplified title formatting.
9179
9180         * vfm.c: (dump_splits) Fixed and changed splits formatting.
9181
9182 Thu Jun  5 22:51:15 1997  Ben Pfaff  <blp@gnu.org>
9183
9184         * autorecode.c: (cmd_autorecode) Sets h_trans to NULL at
9185         beginning.  Frees v_src, v_dest on successful exit.  Frees
9186         h_trans[*], h_trans on lossage.
9187         (recode) Frees h_trans[*], h_trans.
9188
9189         * dfm.c: (dfm_close) Formatting change.
9190         (open_inline_file) Now passed a dfm_fhuser_ext to initialize; no
9191         longer allocates its own in inline_file.
9192         (open_file_r) Passes the local dfm_fhuser_ext to
9193         open_inline_file().
9194         (open_file_w) Message fix. 
9195         (read_record) Buffer reallocation strategy changed.  Frees
9196         ext->line even in inline_file to prevent leaks.
9197         (dfm_put_record) Fixed bug where `ext' was cached before the file
9198         was opened and thus it would be NULL when the file really was
9199         open.
9200         (cmd_begin_data) Sets up inline_file basics itself, then calls
9201         open_inline_file() for the dfm_fhuser_ext.  Formatting fix.
9202
9203         * list.q: (write_line) Formatting fix.
9204         (clean_up) Minor strategy change.  Sets proportional font after
9205         finishing cleanup.
9206         (determine_layout) Sets fixed font before writing regular headers,
9207         or after writing fallback headers.
9208
9209         * modify-vars.c: (cmd_modify_vars) Frees variable lists for DROP
9210         and KEEP vars after using them.
9211
9212         * postscript.c: (ps_init_driver) Frees x->family.
9213         (postopen) When loading fonts, free the temporary font name buffer
9214         after using it.
9215         (ps_text_set_font_by_position) Free temporary font name buffer
9216         after using it.
9217         (text) Fixed code that calculated `lig' so that `lig' always gets
9218         initialized.  Formatting fix.
9219
9220         * som-low.c: (get_cell_size, som_get_table_size) `prop_height' ->
9221         `font_height'.
9222         [GLOBAL_DEBUGGIGN] (check_table) Use arena_alloc() to allocate
9223         cells, not xmalloc(), so that the cells will get destroyed
9224         automatically.
9225
9226         * sysfile-info.c: (cmd_sysfile_info) Frees the dictionary after
9227         using it.
9228
9229 Tue Jun  3 23:33:22 1997  Ben Pfaff  <blp@gnu.org>
9230
9231         * ascii.c: (ascii_text_draw) Always sets metrics for strings that
9232         are drawn.
9233
9234         * dfm.c: Comment fix.
9235
9236         * list.q: Comment fixes.  Include somP.h.  Removed static vars
9237         table, n_columns, n_rows, part.  New struct list_ext.  New static
9238         var line_buf.
9239         (n_lines_remaining, n_chars_width, write_line) New functions.
9240         (cmd_list, list_cases) Rewritten.
9241         (begin_row, end_row, flush_table) Removed.
9242         (write_header, clean_up, write_varname, write_fallback_headers,
9243         determine_layout) New functions.
9244
9245         * output.c: (outp_iterate_enabled_drivers) Minor reformat.
9246
9247         * output.h: Comment fix.
9248
9249         * postscript.c: Comment fix.
9250         (struct ps_driver_ext) Removed prop_size, fixed_size members;
9251         added font_size.  All references changed.
9252         (ps_init_driver) Initializes font_size.  Simplified space checking
9253         code.
9254         (static var option_tab[]) Removed prop-size, fixed-size; added
9255         font-size.
9256         (ps_option) Handles font_size.
9257
9258         * som-high.c: Moved prototypes into somP.h.
9259         (som_init_driver) New function.
9260         (som_submit_table) Moved some code into new function
9261         som_init_driver().
9262         (build_target) Moved some code into new function
9263         som_internal_eject_page().
9264         (som_eject_page) Uses som_internal_eject_page().
9265         (som_internal_eject_page) New function.
9266
9267         * som-low.c: Moved prototypes into somP.h.
9268
9269         * som.h: Formatting fixes.
9270
9271         * somP.h: (struct som_driver_ext) Removed em_width;
9272         added prop_em_width, fixed_width.
9273
9274 Mon Jun  2 14:25:25 1997  Ben Pfaff  <blp@gnu.org>
9275
9276         * Makefile.am: Added `localedir' definition.  Added
9277         -DLOCALEDIR="..." to DEFS.  Added -I. to INCLUDES.
9278
9279         * ascii.c: (macro draw_line) Fixed capitalization.
9280
9281         * ascii.c, autorecode.c, cases.c, cmdline.c, command.c, common.c,
9282         compute.c, count.c, data-in.c, data-list.c, data-out.c,
9283         descript.q, dfm.c, display.c, do-if.c, error.c, expr-evl.c,
9284         expr-opt.c, expr-prs.c, file-handle.q, file-type.c, filename.c,
9285         formats.c, frequencies.q, get.c, getline.c, glob.c, groff-font.c,
9286         hash.c, heap.c, include.c, inpt-pgm.c, lexer.c, list.q, loop.c,
9287         main.c, mis-val.c, misc.c, modify-vars.c, numeric.c, output.c,
9288         postscript.c, print.c, q2c.c, recode.c, rename-vars.c, repeat.c,
9289         sample.c, sel-if.c, sfm-read.c, sfm-write.c, sfmP.h, som-frnt.c,
9290         som-high.c, som-low.c, sort.c, split-file.c, sysfile-info.c,
9291         temporary.c, title.c, tokens.h, val-labs.c, var-labs.c,
9292         vars-atr.c, vars-prs.c, vector.c, vfm.c, weight.c: Marked strings
9293         for internationlization.
9294
9295         * glob.c: [HAVE_LOCALE_H] Includes locale.h.
9296
9297 Sun Jun  1 23:31:18 1997  Ben Pfaff  <blp@gnu.org>
9298
9299         * do-if.c, sort.c, val-labs.c: Comment fixes.
9300
9301         * glob.c: (init_glob) Uncommented, updated i18n support.
9302         
9303         * arena.c, ascii.c, data-in.c, descript.q, error.c, expr-evl.c,
9304         expr-opt.c, expr-prs.c, filename.c, frequencies.q, groff-font.c,
9305         output.c, postscript.c, sfm-read.c, som-high.c, vars-prs.c: Made
9306         the declarations of macros taking arguments a lot nicer.
9307
9308 Sun Jun  1 17:22:04 1997  Ben Pfaff  <blp@gnu.org>
9309
9310         * error.h: Removed CE, CW aliases for SE, SW.
9311
9312         * q2c.c: Removed explicit streq() definition since it's duplicated
9313         in str.h.
9314         
9315         * approx.h, error.h, font.h, hash.h, misc.h, output.h, somP.h,
9316         stats.h, str.h, tokens.h: Made the declarations of macros taking
9317         arguments a lot nicer-looking of <pinard@iro.umontreal.ca>.
9318         Comment fixes.
9319
9320 Sun Jun  1 12:02:06 1997  Ben Pfaff  <blp@gnu.org>
9321
9322         * cmdline.c: Comment fixes.
9323         (pick_compat) Changed return type to int.  Now, instead of setting
9324         glob var `compat' to the emulation, returns the emulation.  All
9325         references changed.
9326         (parse_command_line) Added terminating null to end of
9327         `long_options' array definition.
9328         (pre_syntax_message) Fixes.
9329         (usage) Shows the default emulation in the syntax message by
9330         calling pick_compat().
9331
9332         * getline.c: (getl_add_include_dir) Separates paths with
9333         PATH_DELIMITER, not DIR_SEPARATOR.
9334
9335         * glob.c: (init_glob) Fixed references to DEFAULT_VER_PCP40,
9336         DEFAULT_VER_WIN61, DEFAULT_VER_X40.
9337
9338         * output.c: (outp_configure_macro) Make earlier definitions for a
9339         particular key override later ones for the same key.
9340         
9341 Fri May 30 19:40:49 1997  Ben Pfaff  <blp@gnu.org>
9342
9343         * ascii.c: Comment fixes.
9344
9345         * output.c: (outp_get_paper_size)
9346         s/STAT_OUTPUT_INIT_FILE/STAT_OUTPUT_PAPERSIZE_FILE/.
9347         
9348 Sun May 25 22:34:07 1997  Ben Pfaff  <blp@gnu.org>
9349
9350         * ascii.c, postscript.c, sfm-read.c, sfm-write.c, sort.c: Include
9351         <errno.h>.  GNU libc 2 enforces this!
9352
9353         * command.c: (parse_cmd) Fixed problem with `else' clause being
9354         paired with wrong `if'.  Comment fix.
9355
9356 Fri May  9 16:53:52 1997  Ben Pfaff  <blp@gnu.org>
9357
9358         * getline.c: [!HAVE_LIBREADLINE] (read_console) Changed
9359         blp_getline() to getline().
9360
9361         * output.c: (outp_eval_dimension) Changed the fix from last time;
9362         there was no variable `a'.
9363
9364         * q2c.c: (get_line) Fixed boundary condition overrun bug.
9365
9366 Mon May  5 21:58:22 1997  Ben Pfaff  <blp@gnu.org>
9367
9368         * output.c: (outp_evaluate_dimension) Fixed handling of negative
9369         numbers having fractional parts.  Added case of a fraction without
9370         a whole-number part.
9371
9372 Fri May  2 22:08:05 1997  Ben Pfaff  <blp@gnu.org>
9373
9374         * ascii.c: (ascii_text_get_font_position) Removed.
9375
9376         * expr.h, exprP.h: Disabled debugging.
9377
9378         * groff-font.c, postscript.c: Changed `groff' to `Groff' in
9379         several places.
9380
9381         * output.h: (struct outp_class_struct) Removed
9382         text_get_font_position method.  All references deleted.
9383
9384         * postscript.c: Big change here.  Fontmaps were completely
9385         eliminated because of a change in philosophy.  Comment fixes.
9386         (struct ps_fontmap, ps2dit_map, font_family, dit2family_map)
9387         Removed.
9388         (struct ps_driver_ext) `position', `fontmap', `prop_name',
9389         `fixed_name' members removed.  New members `prop_family',
9390         `fixed_family'.  `family' member changed to type char *.
9391         (static var ps_fontmaps) Removed.
9392         () Removed.
9393         (ps_init_driver) Removed obsolete references, updated.
9394         Initializes `translate_x', `translate_y', `scale'.  Doesn't read
9395         fontmap, of course.  Refers to font names through internal_name
9396         rather than subversive means.  Frees proper items.
9397         (static var option_tab[]) Removed `fontmap-file' option; renamed
9398         `fixed-font', `prop-font'.
9399         (ps_option) Corresponds to option_tab[].
9400         (read_fontmap, release_fontmap, ps_to_dit, compare_ps2dit,
9401         hash_ps2dit, compare_dit2family, hash_dit2family, compare_family,
9402         hash_family) Removed.
9403         (postopen) Generates font names from family names.  Gets
9404         PostScript font name properly.  New prologue file comment `!!!'
9405         style.
9406         (ps_open_page) Adds translate_x, translate_y to BP prologue
9407         function; gives SF argument floating-point format.
9408         (ps_text_set_font_by_name) Doesn't try to map PostScript->Groff
9409         font name.  Doesn't change font family.
9410         (ps_text_set_font_by_position) Generates Groff font name from font
9411         family name instead of through table lookup.
9412         (ps_text_set_font_by_family) Renamed `ps_text_set_font_family',
9413         all references changed.  Reduced to simple string assignment.
9414         (ps_get_font_name) Removed.
9415         (ps_get_font_family) Reduced to string return.
9416         (text) Doesn't save `position' since it no longer exists.  Ugly
9417         kluge to save font family--fix soon?
9418         (load_font) Removed PostScript name argument.
9419         
9420 Thu May  1 14:58:59 1997  Ben Pfaff  <blp@gnu.org>
9421
9422         * postscript.c: Comment fix.
9423         (ps_open_page) Puts scale factor in PostScript output.
9424         
9425 Sat Apr 26 11:49:32 1997  Ben Pfaff  <blp@gnu.org>
9426
9427         * Makefile.am: Distcleans q2c.
9428
9429 Wed Apr 23 21:33:48 1997  Ben Pfaff  <blp@gnu.org>
9430
9431         * ascii.c: (delineate) Sets text size even if width is zero.
9432
9433         * command.c: Comment fix.
9434         (static var cmd_table[]) Re-enabled EVALUATE command.
9435         (parse_cmd) Lotsa comment fixes.  Fixed infinite loop in parsing
9436         of comments in script files.  Now more liberal on criteria for
9437         performing a state transition--if *anything* happened correctly,
9438         not just if *everything* happened correctly.
9439
9440         * data-out.c: (convert_F) Comment fix.  Why in the fsck does
9441         Checker segfault on formatting large numbers and why in the fsck
9442         hadn't I noticed this before?
9443
9444         * expr.h, exprP.h: No longer turn off GLOBAL_DEBUGGING.
9445
9446         * list.q: (cmd_list) Commented out the actual output routine
9447         because of various problems.  Probably will abandon the idea of
9448         using the general `crushed tables' for the LIST procedure.
9449
9450         * temporary.c: (restore_dictionary) Sets var_by_name to NULL after
9451         clearing it.  Allocates a new var_by_name dictionary before trying
9452         to add members to it.
9453
9454         * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed argument
9455         `sib'.  Changed type of `node' argument.
9456         [DEBUGGING] (dump_var_tree) Replaced avlwalk() with
9457         avl_walk_inorder().
9458         (clear_variable) Only dumps the var tree if var_by_name non-NULL.
9459         [DEBUGGING] Only deletes the variable from var_by_name if that var
9460         non-NULL.
9461
9462 Fri Apr 18 16:48:41 1997  Ben Pfaff  <blp@gnu.org>
9463
9464         * Makefile.am: Added include files to SOURCES.  Added
9465         frequencies.q to EXTRA_DIST.  Removed include/ from INCLUDES.  Now
9466         includes rules for q2c.  Added `boast' target.
9467
9468 Fri Apr 18 15:42:22 1997  Ben Pfaff  <blp@gnu.org>
9469
9470         * Makefile.am: Maintainer-clean Makefile.in.
9471         
9472         * Makefile.am: Fixed redundant EXTRA_DIST line.
9473
9474         * ascii.c: Comment fixes.
9475         (ascii_line_vert) Fixed overly aggressive range check.
9476
9477         * display.c: Removed dead code.
9478
9479         * list.q: Turn debugging on.
9480         (flush_table) New debug code.
9481
9482         * sfm-read.c: (read_value_labels) malloc's the structure before
9483         trying to assign to its members.
9484
9485         * sfm-write.c: Comment fix.
9486
9487         * som-high.c: (som_submit_table) Sets som.t and som.d on each call
9488         to output_table().
9489         (output_table) No arguments anymore--gets them through `som'
9490         global.  New debug code.  In crushed tables, now sets `htv' as
9491         well as `hv' to avoid bad confusion later.
9492         (dump_crush_page) New debug code.
9493
9494         * som-low.c: (som_dump_crush_page) New debug code.
9495
9496 Thu Mar 27 01:11:29 1997  Ben Pfaff  <blp@gnu.org>
9497
9498         All source files: Broke long lines into multiple lines.
9499         
9500         * ascii.c: (ascii_close_page) Uses host_system var in place of
9501         HOST_SYSTEM constant.
9502
9503         * cmdline.c: (var syntax_message[]) Broke into
9504         pre_syntax_message[] and post_syntax_message[].
9505         (usage) Outputs both parts, separated by driver list.
9506
9507         * error.h: Fixed broken formatting.
9508
9509         * expr-opt.c: (str_search, str_rsearch) New functions.
9510
9511         * misc.c: (blp_getdelim) Removed.  All references changed to
9512         `getdelim'.
9513         (str_search, str_rsearch) Removed.
9514         (memrmem) New function.
9515
9516         * misc.h: (blp_getline) Removed.  All reference changed to
9517         `getline'.
9518
9519         * stat.h: New file.
9520
9521         * filename.c: Includes "stat.h", not <sys/stat.h>.
9522         (blp_getenv) Uses host_system var instead of HOST_SYSTEM constant.
9523
9524         * output.c: (outp_list_classes) Changed output formatting.
9525
9526         * sfm-write.c: (write_header) Uses host_system var instead of
9527         HOST_SYSTEM constant.
9528         (write_rec_7_34) Extracts version numbers from the version string.
9529         Untested.
9530
9531         * sort.c: Includes "stat.h", not <sys/stat.h>.
9532
9533         * str.c: (strcasecmp) Removed.
9534
9535         * title.c: (cmd_document) Uses host_system var instead of
9536         HOST_SYSTEM constant.
9537
9538         * version.c: Generated on-the-fly by the Makefile instead of being
9539         static.
9540
9541         * str.h: Comment fixes.  Doesn't substitute for missing memmove or
9542         memcpy.
9543         [!HAVE_STRNCASECMP] Declares strncasecmp().
9544
9545         * version.h: Removed stray character.  Comment fixes.
9546         (vars host_system, build_system) New vars.
9547
9548 Mon Mar 24 21:47:31 1997  Ben Pfaff  <blp@gnu.org>
9549
9550         * Most source files: Changed formatting of copyright notice; fixed
9551         FSF address; reformatted to better conform to GNU standards;
9552         comment fixes.  Added markups to prevent GNU indent from messing
9553         up my beautiful formatting :-).
9554         
9555         * q2c.c: (get_line) Ignores lines that begin with `/* *INDENT' so
9556         that GNU indent markups can be passed through without problems.
9557
9558 Wed Feb 19 21:30:31 1997  Ben Pfaff  <blp@gnu.org>
9559
9560         * get.c: Turned off debugging.
9561
9562         * glob.c: (init_glob) Turned on save-file compression by default.
9563
9564         * sfm-write.c: (sfm_write_case) Fixed bug which resulted in less
9565         compression than was possible in save files.
9566
9567 Sun Feb 16 20:57:20 1997  Ben Pfaff  <blp@gnu.org>
9568
9569         * data-out.c: (convert_F) Comment fixes.  Debug message fixes.
9570
9571         * frequencies.q: Removed Fiasco extensions.  Updated calculation
9572         algorithms.  Polished output format. 
9573         (struct frq_info_struct) Removed members `max_degree', `min_n',
9574         all references removed.
9575         (macro frq_extensions) Removed.
9576         (static vars min_n, max_degree) Removed, all references removed.
9577         (internal_cmd_frequencies) Doesn't handle extensions.  Doesn't
9578         calculate `min_n', `max_degree'.
9579         (postcalc) Passes new arg to dump_statistics().
9580         (dump_full) Honor NOLABEL option.  Buggy?  Adds variable name
9581         title.
9582         (dump_condensed) Adds variable name title.
9583         (sum_freqs) Removed.
9584         (calc_stats) Updated calculation algorithm.
9585         (dump_statistics) Removed warning for too-few observations.
9586         Changed table formatting.  Adds variable name title if passed new
9587         arg is nonzero.
9588
9589         * output.h: Comment fix.
9590
9591         * recode.c, sample.c, sort.c: Disabled debug code.
9592
9593         * som-frnt.c: (som_set_value, som_set_float, som_set_text)
9594         Improved debug code.
9595
9596         * var.h: (enum series frq_*) Removed Fiasco extensions.
9597
9598 Sat Feb 15 21:26:53 1997  Ben Pfaff  <blp@gnu.org>
9599
9600         * command.c: Added PROCESS IF to command table.
9601
9602         * Lots & lots of places, removed checks for NULLs preceding calls
9603         to free_expression(), which itself checks.
9604
9605         * descript.q: Removed Fiasco extensions.  Removed optimizations
9606         for non-weighted active files.  Implemented some options.
9607         Finished polishing output format.  Comment fixes.  Merged
9608         `descript.g'.
9609         (static vars n_glob_miss_list, n_glob_valid, n_glob_missing,
9610         max_degree, min_n) Removed.
9611         (macro dsc_extensions) Removed.
9612         (struct dsc_info_struct) Removed `min_n' member, all references
9613         fixed.
9614         (internal_cmd_descriptives) Removed calculation of min_n,
9615         max_degree.  Only deals with one `calc' routine instead of two
9616         flavors.
9617         (precalc) Eliminated redundancy.  Updated for changes to
9618         descriptives_proc structure.
9619         (calc) Moved here from `descript.g'.  Rewritten to calculate
9620         statistics via `moments about the mean' rather than by summing,
9621         summing squares, summing cubes, and so on.
9622         (postcalc) Rewritten for new-style statistical calculation.
9623         (display) Removed support for displaying variables across rows.
9624         No longer crushes the descriptives table.  Removed ancient code.
9625         Added display of N, by variable and listwise.
9626
9627         * descript.g: Removed; merged into `descript.q'.
9628
9629         * expr-evl.c: (evaluate_expression) Now returns a double.  For
9630         numeric results, it returns the result as well as storing it in
9631         the passed `value' structure if non-NULL.  For string results it
9632         just returns 0.0 and it must be passed non-NULL.  Many references
9633         to this function were optimized by use of this change, especially
9634         but not exclusively in `compute.c'.
9635
9636         * frequencies.g: Comment fix.
9637
9638         * glob.c: (glob var process_if_expr) New global var.
9639
9640         * postscript.c: (static var option_tab[]) Corrected entry for
9641         `fixed_size'.
9642         (postopen) Sets x->size to x->prop_size.
9643         (ps_text_set_font_by_name) Sets font size as well as typeface for
9644         PROP and FIXED fonts.
9645         
9646         * sel-if.c: (cmd_process_if) New function.
9647
9648         * sfm-write.c: (struct sfm_fhuser_ext) New member `n_cases'.
9649         (sfm_write_dictionary) Sets `n_cases' to 0.
9650         (sfm_write_case) Increments `n_cases'.
9651         (sfm_close) Attempts to seek the system file back to the header
9652         and write the number of cases in its proper slot.
9653
9654         * som-frnt.c: (som_insert_table) Masks off expansion options since
9655         only SOPT_X_NORM seems to work sensibly.
9656
9657         * som-low.c: (get_cell_size) Fixed bug when a table cell was sized
9658         with a `fixed' value of 2.
9659
9660         * sort.c: (cmd_sort_cases) Cancels PROCESS IF.
9661
9662         * sysfile-info.c: (cmd_sysfile_info) Doesn't display more than 10
9663         value labels; uses SOPT_NONE instead of SOPT_X_BOTH.
9664
9665         * var.h: (enum series dsc_*) Removed Fiasco extensions.
9666         (struct descriptives_proc) Removed `miss_noweight'; new members
9667         `X_bar', `M2', `M3', `M4', `min', `max'.
9668
9669         * vars-atr.c: (discard_variables) Cancels PROCESS IF.
9670
9671         * vfm.c: (close_active_file) Cancels PROCESS IF.
9672         (write_case) Doesn't process cases unselected by PROCESS IF.
9673
9674 Fri Feb 14 23:32:58 1997  Ben Pfaff  <blp@gnu.org>
9675
9676         * glob.c: (glob var err) Removed.
9677
9678         * sysfile-info.c: (cmd_sysfile_info) When adjusting table size,
9679         doesn't have to take into account number of value labels since
9680         they're in a subtable anyway.  Also, doesn't display more than 10
9681         value labels since we can't yet break pages in subtables.
9682
9683 Tue Feb  4 15:15:50 1997  Ben Pfaff  <blp@gnu.org>
9684
9685         * som-frnt.c: (som_change_table_size) Simple change for elegance
9686         that shouldn't change behavior.
9687         (som_set_value) Comment fix.
9688
9689         * som-high.c: (som_submit_table) Message fix.
9690
9691 Wed Jan 22 21:54:00 1997  Ben Pfaff  <blp@gnu.org>
9692
9693         * command.c: Added SYSFILE INFO to command table.
9694
9695         * file-handle.q: (fh_handle_filename) New function.
9696
9697         * get.c: (save_trns_proc) Fixed a bug in padding of output data
9698         with spaces.
9699
9700         * main.c: (parse) New return value for command functions, -3.
9701
9702         * misc.h: Comment fix.
9703
9704         * output.h: Comment fixes.
9705         (macro COMPONENTS) Removed.
9706
9707         * postscript.c: (write_text) Modified literal_chars[] so that `('
9708         and ')' are not written to the output in strings as literals.
9709
9710         * sfm-read.c: (sfm_read_dictionary) New argument.
9711         (read_header) New argument.  Sets the information structure's
9712         values from the header information.  
9713         (read_variables) [__CHECKER__] Redefines isalnum()--some sort of
9714         bizarre Checker problem, I guess.
9715         (read_variables) Proper cleanup on lossage.
9716
9717         * sfm.h: (struct sfm_read_info) New struct for use by
9718         sfm_read_dictionary().
9719
9720         * som-frnt.c: (som_create_table) New argument CREATE_FLAGS,
9721         currently used just for tables that can be dynamically resized and
9722         thus have to be allocated with arena_malloc() instead of
9723         arena_alloc().  All references changed.
9724         (som_change_table_size) New function.
9725         (som_insert_table) Bugfix: now inserts `cell', not `c'!
9726
9727         * som-high.c: [GLOBAL_DEBUGGING] (check_table) Moved to som-low.c.
9728         (som_submit_table) [GLOBAL_DEBUGGING] Doesn't call check_table()
9729         any more.
9730
9731         * som-low.c: (draw_cell) Calls draw_table_cell() for SCON_TABLE
9732         cells.
9733         (draw_intersection) Now takes an argument specifying the table in
9734         question.  All references changed.
9735         (draw_table_cell) New function.
9736         (som_get_table_size) [GLOBAL_DEBUGGING] Calls check_table().
9737         (som_get_table_size) Many nice new explanatory comments.
9738         [GLOBAL_DEBUGGING] (check_table) Moved here from som-high.c.
9739
9740         * som.h: New enum series SOM_CREATE_* for use as create flags with
9741         som_create_table().
9742
9743         * str.h: Moved a comment here from TODO.
9744
9745         * sysfile-info.c: New file.  Reference implementation.
9746
9747 Sun Jan 19 14:22:11 1997  Ben Pfaff  <blp@gnu.org>
9748
9749         * command.c: Added RENAME VARIABLES to table of commands.
9750
9751         * data-in.c: (dls_error) Sets `cust_field'.
9752         (parse_N) Message fix.
9753         (parse_day_count) New function.
9754         (to_roman) Never outputs VX as a `short form' of V.
9755         (parse_month) Fixed parsing of Roman numerals.
9756         (parse_trailer) Message fix.
9757         (parse_DATE, parse_ADATE, parse_EDATE, parse_SDATE, parse_JDATE,
9758         parse_QYR, parse_MOYR, parse_WKYR, parse_DTIME) Issue a message if
9759         the date is invalid.
9760         (parse_SDATE) Fixed swapped day, year.
9761         (parse_JDATE) Fixed bug for dates in 1582.
9762         (parse_DTIME) Allows days not between 1 and 31.
9763         (parse_numeric) Makes local copy of f.type for easier usage.
9764         FMT_DOLLAR fixed.
9765
9766         * data-out.c: (convert_F) When outputting as scientific, properly
9767         sets f.type as fp->type.
9768         (insert_commas) Fixed operator precedence problem with setting of
9769         nitems.  Changed strcpy to memcpy (no null terminator). 
9770         (convert_date) Fixed FMT_JDATE: added 1900 to year.
9771         (convert_CCx) Essentially rewritten, but now it works.
9772
9773         * display.c: (cmd_display) Added DISPLAY FILE LABEL (undocumented
9774         feature of Fiasco).
9775         (display_documents) Implemented.
9776
9777         * error.c: (glob var cust_field) New var.
9778         (vmsg) Displays cust_field as part of message classes DE and DW.
9779
9780         * formats.c: (debug_print) Fixed to compile under updated
9781         dictionary format.
9782
9783         * get.c: (cmd_get, cmd_save_internal) Close file handle on
9784         failure.
9785
9786         * misc.c: (parse_format_specifier) Formatting fix.
9787
9788         * modify-vars.c: (struct var_modification) Renamed `n_reorder' as
9789         `n_rename' for clarity.
9790         (cmd_modify_vars) Initializes `forward' and `positional' at
9791         appropriate times.  Frees lists of vars to rename on failure.
9792         Comment fix.  Frees memory on success.  
9793         (rearrange_dict) Simplified `for' loop condition.
9794
9795         * rename-vars.c: New file (reference implementation).
9796         
9797         * set.q: (internal_cmd_set) Fixed `emu' test condition.
9798
9799         * sfm-read.c: (read_header) File label is created only if file
9800         label in file is not blank.
9801         (read_variables) Initializes `dict' local variable.
9802         (read_documents) Proper behavior on lossage.
9803
9804         * sfm-write.c: (write_header) Doesn't blank out the file label
9805         (why was this here to begin with?!)
9806
9807         * temporary.c: (save_dictionary) File label is copied only if
9808         non-NULL.  Doesn't try to xstrdup() dictionary documents.
9809         Adapted so as to not irritate Checker.
9810         (free_dictionary) Only destroys var_by_name if non-NULL.
9811
9812         * title.c: (cmd_file_label) Doesn't skip FILE, LABEL tokens.
9813         (cmd_document) Doesn't skip DOCUMENT token.  Adds some header
9814         lines to the document, indents the document.  Also, it works now.
9815         (add_document_line) New function.
9816
9817         * var.h: (struct dictionary) Reordering.
9818
9819         * vars-prs.c: (parse_variables) On lossage, only local_free()'s
9820         bits if it was allocated to begin with.
9821
9822 Thu Jan 16 13:08:57 1997  Ben Pfaff  <blp@gnu.org>
9823
9824         * command.c: Added MODIFY VARS to list of commands.
9825
9826         * configure.in: Updated custom macros for autoconf 2.12.  Removed
9827         mmap reference; fixed termcap library reference.
9828
9829         * display.c: (display_variables) Fixed a few bugs although it's
9830         still not well written.
9831
9832         * error.c: [!__CHECKER__] (chkr_disp_call_chain) New function.
9833         (induce_segfault) Calls chkr_disp_call_chain() instead of
9834         inducing an actual SIGSEGV.
9835
9836         * expr-opt.c: (evaluate_tree) Swapped order of arguments to
9837         str_search() and str_rsearch().  Fixed tests for matches on
9838         OP_INDEX and OP_RINDEX.
9839
9840         * filename.c: (good_getcwd) Removed as the new libc for Checker
9841         doesn't contain this bug, apparently.
9842
9843         * misc.c: (str_search, str_rsearch) Changed order of arguments for
9844         consistency with GNU memmem.
9845         (blp_getdelim) Changed `len' from `int' to `size_t'.
9846
9847         * modify-vars.c: Reference implementation.
9848
9849         * som-frnt.c: (zero_length) New global var.
9850         (som_create_table) Message fix.
9851
9852         * som.h: Added gcc attributions to som_set_text(),
9853         som_output_text() prototypes.  blank_line() refers to
9854         zero_length[] instead of a literal null string to suppress gcc
9855         warnings.
9856
9857         * sort.c: (do_external_sort) Fixed fencepost error on lossage.
9858         (allocate_cases) Decrements x_max so the last element of x[] can
9859         be used by the algorithm.
9860
9861         * var.h: Changed minor details of `variable' declaration.  
9862         (struct modify_vars_proc) New struct.
9863         (struct variable) Added field p.mfv.
9864
9865         * vars-atr.c: Comment fix.
9866
9867         * vars-prs.c: (fill_all_vars) More optimal implementation.
9868
9869         * vfm.c: (dump_splits) Sets the last byte of temp_buf to a null
9870         character, which it shouldn't have to do but printf() seems to
9871         read the null byte even though I supply a maximum length...
9872
9873 Fri Jan 10 20:22:08 1997  Ben Pfaff  <blp@gnu.org>
9874
9875         * command.c: Removed command alias X for QUIT.
9876         (parse_cmd) Fixed comment parsing.
9877
9878         * dfm.c: (struct dfm_fhuser_ext) Fields `len', `size' are now of
9879         type size_t.
9880         (read_record) Fixed references to len, size.
9881         (dfm_get_record) Restructured.
9882
9883         * file-handle.h: (struct file_handle) Field `lrecl' now of type
9884         size_t.
9885
9886         * file-handle.q: (internal_cmd_file_handle) Checks for nonpositive
9887         record length.
9888
9889         * modify-vars.c: New file.  Not complete.
9890         
9891         * set.q: (set_ccx) Fixed operator precedence problem regarding ^
9892         and ==.
9893
9894         * sfm-read.c: (bswap_flt64, read_header, write_variable) Fixed
9895         problems caused by int/size_t differences.
9896
9897         * sort.c: (output_record, merge_once) Cast `size_t's to `int's in
9898         appropriate spots.
9899
9900         * str.c: (strcasecmp) Fixed bug that cropped up when the strings
9901         being compared were of equal length.
9902
9903 Thu Jan  2 19:08:23 1997  Ben Pfaff  <blp@gnu.org>
9904
9905         * command.c: Added DOCUMENT, DROP DOCUMENTS, FILE LABEL.
9906
9907         * lexer.c: (get_dotted_rest_of_line) New function.
9908
9909         * sel-if.c: (cmd_filter) Cannot choose string or scratch variables
9910         as filters.
9911
9912         * sfm-read.c: (sfm_read_dictionary) Calls read_documents() to read
9913         type 6 records.  Frees the dictionary properly.
9914         (read_header) Initializes the dictionary instead of letting
9915         read_variables() do it.  Sets the dictionary file label from the
9916         system file.
9917         (read_documents) New function.
9918
9919         * sfm-write.c: (sfm_write_dictionary) Calls write_documents() to
9920         write type 6 record if appropriate.
9921         (write_header) Writes file label from dictionary.
9922         (write_documents) New function.
9923
9924         * temporary.c: (save_dictionary, restore_dictionary,
9925         free_dictionary) Properly handle new fields in dictionary struct.
9926
9927         * title.c: (get_title) Returns after failure().
9928         (cmd_file_label, cmd_document, cmd_drop_documents) New functions
9929         for new commands FILE LABEL, DOCUMENT, DROP DOCUMENTS.  Untested.
9930
9931         * var.h: (struct dictionary) New fields `label', `n_documents',
9932         `documents'.
9933
9934 Wed Jan  1 22:08:10 1997  Ben Pfaff  <blp@gnu.org>
9935
9936         * command.c: Added FILTER to list of commands.
9937
9938         * frequencies.g: [WEIGHTING] Removed test for weighting!=-1 since
9939         it's always true.
9940
9941         * get.c: (cmd_save_internal) Removed weighting code since it's now
9942         handled by sfm-write.c.  Properly commented out debug code.
9943
9944         * glob.c: (glob var weighting) Removed.
9945
9946         * sel-if.c: Comment fixes.
9947         (cmd_filter) New function.
9948
9949         * sfm-read.c: (struct sfm_fhuser_ext) New field `weight_index'.
9950         (sfm_read_dictionary) Sets weighting variable direct in the
9951         created dictionary now.  (Apparently we previously didn't support
9952         weighting on GET?)
9953         (read_header) Sets weight_index field in sfm_fhuser_ext from
9954         header read from disk.
9955
9956         * sfm-write.c: (sfm_write_dictionary) Comment fix.
9957         (write_header) Now sets the weighting in the header from the
9958         passed primary dictionary instead of from the sfm_write_info.
9959
9960         * sfm.h: (struct sfm_write_info) Removed field `weight'.
9961
9962         * som-high.c: (dump_crush_table) Fixed a couple of assertions that
9963         broke on boundary conditions.
9964
9965         * var.h: (struct dictionary) New fields `weight_var',
9966         `weight_index', and `filter_var'.
9967         (glob var weighting) Removed.  This is now part of struct
9968         dictionary.  All references changed; the less mechanical changes
9969         are described above.
9970
9971         * vars-atr.c: (find_dict_variable) New function.
9972
9973         * vfm.c: (static var filter_index) New variable.
9974         (open_active_file) Initializes filter_index from default_dict.
9975         (write_case) Calls proc_func() only if the filter variable is
9976         nonzero; this implements FILTER behavior.
9977
9978         * weight.c: (static var weight_varname) Removed.
9979         (cmd_weight) Modified default_dict instead of glob vars.
9980         (update_weighting) Changed the signature to modify a dictionary
9981         instead of glob vars.  Now returns the weighting variable.
9982         (get_weighting_variable) Removed; its function is absorbed by
9983         update_weighting().
9984         (stop_weighting) Operates on a dictionary now.
9985
9986 Wed Jan  1 17:00:59 1997  Ben Pfaff  <blp@gnu.org>
9987
9988         * sort.c: Removed debugging info from messages.
9989         (do_external_sort) Cleans up after itself by deleting the
9990         temporary directory on failure.  (On success it is deleted by the
9991         input program.)
9992         (allocate_cases) Removed debug code.  Added clean up code.
9993         (output_record) Removed debug code.
9994         (merge) Added code to close all the input files that are currently
9995         open.  This is a likely location for bugs, because I'm not sure
9996         about boundary conditions.  Removed an unnecesary heap_delete().
9997         (merge_once) Removed input file "optimization" that in fact
9998         screwed up the rest of the code.  Message and comment fixes.
9999
10000 Sun Dec 29 21:36:48 1996  Ben Pfaff  <blp@gnu.org>
10001
10002         * error.c: [__CHECKER__] (induce_segfault) Flushes output streams.
10003
10004         * heap.c: (heap_delete) New argument.
10005
10006         * sort.c: Finished implementation of external sort.
10007
10008         * vfm.c: (read_from_disk) Returns after a disk error.
10009
10010 Sun Dec 22 23:10:39 1996  Ben Pfaff  <blp@gnu.org>
10011
10012         * sort.c: (static var state) Removed.
10013         (static vars max_handles, tmp_basename, tmp_extname,
10014         huffman_queue) New variables.
10015         (do_external_sort) Moved most code to new functions.
10016         Creates huffman_queue.
10017         (allocate_file_handles, allocate_cases) New functions.
10018         (static vars run_no, run_length, file_index, case_count) New
10019         variables. 
10020         (output_record) Returns success.  Now really writes to the output
10021         file.
10022         (begin_run, end_run) New functions.
10023         (write_initial_runs) Returns success.  Initializes run_no to -1.
10024         Calls begin_run(), end_run() at appropriate times.  Outputs debug
10025         messages.
10026         (write_to_sort_cases) Calls begin_run(), end_run() at appropriate
10027         times.
10028         (merge) New function.
10029
10030         * heap.c, heap.h: New files.  Hopefully in near-final form.
10031
10032 Sat Dec 21 21:51:04 1996  Ben Pfaff  <blp@gnu.org>
10033
10034         * glob.c: Added write_active_file to global vars.
10035
10036         * sort.c: Several new miscellaneous static variables.
10037         (cmd_sort_cases) Big comment fix.
10038         (perform_case_2) Renamed `do_external_sort' and completely
10039         rewritten.
10040         (case_2_proc_func) Removed.
10041         (output_record, write_initial_runs, write_to_sort_cases,
10042         compare_record) New functions.
10043
10044         * vfm.c: [DEBUGGING] (index_to_varname) Excised bit rot.
10045
10046 Tue Dec 17 18:57:59 1996  Ben Pfaff  <blp@gnu.org>
10047
10048         * sort.c: (perform_case_2) Changed the method for allocation of
10049         lots of memory--now allocates one case at a time in hopes that
10050         more cases can be allocated with heavily fragmented memory.
10051
10052         * var.h: (write_active_file) New global var.
10053
10054         * vfm.c: (procedure, close_active_file, write_case,
10055         SPLIT_FILE_procfunc) Now allow beginfunc, procfunc, and endfunc
10056         arguments to procedure() to be NULL.  All references to
10057         procedure() that made use of dummy functions were changed to NULL
10058         functions.
10059         (open_active_file) If write_active_file is non-NULL, the output
10060         device becomes DEV_PGM (a new enum).
10061         (close_active_file) Sets write_active_file to NULL.
10062         (read_from_memory) Comment fix.
10063         (record_case) Calls write_active_file() when the output device is
10064         DEV_PGM.
10065
10066 Sun Dec 15 15:32:16 1996  Ben Pfaff  <blp@gnu.org>
10067
10068         * sort.c: New file.
10069
10070         * autorecode.c: (cmd_autorecode) Fixed parsing of options.
10071         Fixed checking for duplicate varnames.
10072         (recode) xmalloc()'s the transformation instead of arena_alloc()'ing
10073         it.
10074         (autorecode_trns_free) Destroys hash tables for each recoding
10075         specification.
10076         (autorecode_proc_func) Compares NULL to *vpp instead of vpp.
10077
10078         * command.c: Added SORT CASES to cmd_table.
10079         (null_func, null_int_func) Prototyped.
10080
10081         * descript.g: (calc_weight, calc_noweight) Computes own case
10082         number now.
10083         
10084         * frequencies.q: (dump_statistics) Fixed problem with
10085         too-few-cases warning message.
10086
10087         * get.c: (cmd_save_internal) Handles weighting properly.
10088
10089         * hash.c: (hsh_dump) Output format changed.
10090         (force_hsh_insert) Actually works now, prototype changed.
10091
10092         * list.q: (static var case_num) New variable.
10093         (cmd_list) Initializes case_num.
10094         (list_cases) Increments case_num.
10095
10096         * var.h: Added definitions for SORT CASES.  Comment fixes.
10097
10098         * vfm.c: Some definitions moved to new file vfmP.h.  Comment
10099         fixes.  `active' renamed vfm_active, `rep' renamed
10100         vfm_replacement, all references changed.
10101         (procedure) The procfunc no longer receives a case number.  All
10102         references changed.
10103         (write_case) Subtle reordering.
10104         (SPLIT_FILE_procfunc) Counts cases differently.  Slightly less
10105         redundant.
10106
10107         * weight.c: (get_weighting_variable) New function.
10108
10109         * vfmP.h: New file with definitions from vfm.c.
10110
10111 Sat Dec 14 10:35:30 1996  Ben Pfaff  <blp@gnu.org>
10112
10113         * command.c: (FILE_TYPE_okay) Commented out some tests because
10114         they're clumsy and not yet needed.
10115
10116         * var.h: Most *_trns structures moved to their respective source
10117         files.  Some were moved into a new file, do-ifP.h.  Comment fixes.
10118         (union any_trns) Changed to a typedef for trns_header.
10119         (struct input_program_pgm) Removed.
10120
10121         * vars-prs.c: (parse_variables) Only local_free()'s bits if it
10122         was allocated in the first place.
10123
10124 Fri Dec 13 21:30:53 1996  Ben Pfaff  <blp@gnu.org>
10125
10126         * autorecode.c: New file.
10127         
10128         * command.c: Added AUTORECODE to command table; re-enabled SET.
10129
10130         * data-out.c: (convert_F) Handles infinities and NaNs properly.
10131
10132         * error.c: (vmsg) Comment fixes.
10133
10134         * hash.c: Comment fix.
10135         (hashpjw_d) New function.
10136         (hashpjw) Reimplemented as call to more general function
10137         hashpjw_d().
10138         (internal_comparison_fn) Initializes pointers properly.
10139         (hsh_sort) [GLOBAL_DEBUGGING] New debugging code.
10140         (force_hsh_insert, force_hsh_find) New debugging wrapper
10141         functions.
10142
10143         * main.c: (main) Message fix.
10144
10145         * output.c: (outp_read_devices) Message fix.
10146
10147         * set.q: Comment fixes.
10148         (custom_results) Implemented Wnd/X form of subcommand.
10149         (set_routing) New function.
10150         (internal_cmd_set) Implemented ERRORS, MESSAGES.
10151
10152         * settings.h: (SET_ROUTE_*) New enum series.
10153         (set_results) Renamed set_results_file, all references changed.
10154         (set_messages) Removed.
10155         (glob vars set_errors, set_messages, set_results) New vars.
10156
10157         * title.c: (get_title) Remembers to xstrdup() the result of
10158         get_rest_of_line().
10159
10160         * var.h: (arc_item, arc_spec, autorecode_trns) New structures for
10161         use by AUTORECODE.
10162         (union any_trns) New element `arc'.
10163
10164 Fri Dec  6 23:53:47 1996  Ben Pfaff  <blp@gnu.org>
10165
10166         * command.c: (output_line) Removed references to set_screen.
10167
10168         * error.c: (static var terminating) New var.
10169         (hcf) Sets terminating to 1.
10170         (vmsg) If terminating is nonzero, does not attempt to call hcf().
10171         This prevents an infinite loop if an error occurs within hcf().
10172
10173         * expr-evl.c: (evaluate_expression) [__CHECKER__] Replaced case
10174         statement circumlocution with `case 42000' trick.
10175         (evaluate_expression) New support for OP_STR_MIS.
10176
10177         * expr-opt.c: (evaluate_expression) [__CHECKER__] Replaced case
10178         statement circumlocution with `case 42000' trick.
10179         (dump_node) Handles OP_STR_MIS.
10180
10181         * expr-prs.c: (MISSING_func, SYSMIS_func) Rewrote to handle string
10182         variables exceptions.
10183         (parse_function) Message fix.
10184         (ops[]) Added OP_STR_MIS.
10185
10186         * expr.h: Added OP_STR_MIS to OP_* enum.  Comment fixes.
10187
10188         * exprP.h: [__CHECKER__] Removed case statement circumlocution.
10189
10190         * glob.c: Removed set_scrnfile glob var.
10191         (init_glob) set_errorbreak set to 0 by default.
10192
10193         * groff-font.c: Changed included files.
10194         (groff_read_font) Initializes font_arena local var correctly.
10195         (default_font) New function.
10196
10197         * output.c: Comment fixes.
10198         (glob var disabled_devices) New variable.
10199         [GLOBAL_DEBUGGING] (static var iterating_driver_list) New
10200         variable.
10201         [GLOBAL_DEBUGGING] (reentrancy) New function.
10202         [GLOBAL_DEBUGGING] (outp_read_devices, outp_done, find_driver,
10203         outp_iterate_enabled_drivers) Calls to reentrancy().
10204         (destroy_list) New function.
10205         (outp_done) Moved code to destroy_list().
10206         (parse_options) Parses `listing', `screen', `printer' options
10207         internally.
10208         (configure_driver) Sets new `device' member of driver.
10209         (outp_iterate_enabled_drivers, outp_enable_device) New functions.
10210
10211         * output.h: Comment fixes.  New enum series OUTP_DEV_*.
10212         (struct outp_driver_struct) New member `device'.
10213
10214         * postscript.c: (find_encoding_file) Doesn't display its own error
10215         messages.
10216         (default_encoding) New function.
10217         (switch_font) Calls default_encoding() if no encoding can be
10218         found.
10219         (text) Makes up a character metric if none exists for the desired
10220         character.
10221         (load_font) Properly copies a fallback filename.  Calls
10222         default_font() for a font if none at all are known.
10223
10224         * set.q: Comment fixes.  Removed OUTPUT subcommand.
10225         (custom_listing) Calls outp_enable_device() to enable/disable
10226         listing device.
10227         (turn_screen_on) Removed.
10228         (internal_cmd_set) Calls outp_enable_device() to enable/disable
10229         screen, printer devices.
10230
10231         * settings.h: Comment fixes.
10232         (glob vars set_output, set_printer, set_screen, set_scrnfile)
10233         Removed.
10234
10235         * som-high.c: (som_submit_table, som_eject_page) Use
10236         outp_iterate_enabled_drivers() instead of iterating
10237         outp_driver_list directly.
10238
10239 Wed Dec  4 21:34:17 1996  Ben Pfaff  <blp@gnu.org>
10240
10241         * data-in.c: (parse_EDATE, parse_SDATE) New functions.
10242         (parse_string_as_format) Handles new formats.
10243         (parse_numeric) Now handles DOT and PCT formats.
10244
10245         * data-out.c: (convert_E, convert_F, insert_commas) Handle DOT
10246         format now.
10247         (convert_date) Handle EDATE and SDATE formats.
10248         (convert_CCx) Now if there's not room for the currency characters,
10249         converts it as F format if it's positive instead of giving up
10250         quickly.  Also fixed save-and-restore bug with decimal point
10251         characters.  
10252         (convert_format_to_string) Handles new formats.
10253
10254         * misc.c: (formats[]) Added new formats.
10255         (convert_fmt_ItoO) Supports new formats.
10256
10257         * sfm-read.c: (parse_format_spec) Supports new formats.  Better
10258         data checking.  New argument, all references changed.
10259
10260         * sfm-write.c: (write_format_spec) Supports new formats.
10261
10262         * var.h: New formats FMT_DOT, FMT_PCT, FMT_EDATE, FMT_SDATE.
10263         Comment fixes.
10264
10265 Sun Dec  1 17:19:00 1996  Ben Pfaff  <blp@gnu.org>
10266
10267         * cmdline.c: Comment fixes.
10268         (parse_command_line) Changed return type to void.
10269
10270         * data-in.c: (parse_string_as_format) Added FMT_CCA...FMT_CCE to
10271         switch.
10272         (parse_numeric) Handles international numbers (comma as decimal
10273         point).  Some reformatting.
10274
10275         * data-list.c: (parse_free) Default output format is now
10276         set_format instead of hard-coded F8.2.
10277         (read_from_data_list_list) Emits error message on undefined data
10278         only if set_undefined is nonzero.
10279
10280         * data-out.c: (convert_E) Changes decimal point from period to
10281         comma if appropriate.  Restructured.  Better comments.
10282         (convert_F) Changes decimal point from period to comma if
10283         appropriate.
10284         (insert_commas) Major bug with handling of negative values fixed.
10285         Also, inserts periods instead of commas if appropriate.
10286         (convert_CCx) New function.
10287         (convert_format_to_string) Added FMT_CCA...FMT_CCE to switch.
10288         (num_to_string) Changed `.' to set_decimal.
10289
10290         * dfm.c: Comment fixes.
10291         (dfm_close) Frees ext->line even in inline_file.
10292         (open_inline_file) New function.
10293         (open_file_r) When opening the inline file: now properly
10294         recognizes `BEGIN DATA.' line, and calls open_inline_file() to
10295         finish up.
10296         (read_record) Calls fh_close_handle() instead of dfm_close() to
10297         close the inline file.  Makes a copy of the line getl_buf to avoid
10298         interlock problems.
10299         (dfm_get_record) Restructured.  Now checks the return value of
10300         open_file_r().
10301         (cmd_begin_data) Moved open code into open_inline_file().  Relaxed
10302         checking for use of inline file.  No longer tries to close inline
10303         file.
10304
10305         * error.c: (glob var error_already_flagged) New var.
10306         (vmsg) Message change.  Now checks max number of errors/warnings,
10307         acts on it.
10308
10309         * file-handle.q: (fh_handle_name) Now allows closing of
10310         inline_file.
10311         (fh_init_files) Reformatted.
10312
10313         * get.c: (trim_dictionary) Checks SCOMP option instead of COMP.
10314
10315         * getline.c: (getl_include) Fixed bug that popped up when called
10316         when file queue was empty.
10317         (read_console) Resets error_count, warning_count,
10318         error_already_flagged to zero.
10319
10320         * glob.c: Many changes to update list of variables.
10321         (init_compat_dependent) Now this function is called whenever
10322         `compat' changes.  It now sets set_seed only if it hasn't
10323         previously been referenced.  It now calls
10324         lex_init_compat_dependent().
10325
10326         * include.c: (cmd_include_at) Frees temporary buffer instead of
10327         line buffer.  
10328         (cmd_include) Doesn't make copy of include file name.
10329
10330         * lexer.c: Comment fixes.
10331         (init_lex) Moved some code into new function
10332         lex_init_compat_dependent().
10333         (lex_init_compat_dependent) New function.
10334         (hex_val) Simplified.
10335         (preprocess_line) Uses set_endcmd instead of hardcoding `.'.
10336
10337         * main.c: Comment fixes.
10338         (main) Reformatted.
10339
10340         * misc.c: (formats[]) Added FMT_CCA...FMT_CCE.
10341         (check_input_specifier) Disallows FMT_CCA...FMT_CCE.
10342         (convert_fmt_ItoO) Detects FMT_CCA...FMT_CCE.
10343         (setup_randomize) Sets set_seed_used.
10344
10345         * set.q: Comment fixes.
10346         (custom_results) Conditionalizes on `compat'.
10347         (custom_log) Calls custom_journal().
10348         (set_ccx) New function.
10349         (cmd_set) Calls init_compat_dependent() when `compat' changes.
10350         Calls set_ccx() to handle CCA...CCE.  Sets set_grouping
10351         when set_decimal changes.  Range-checks values for MITERATE,
10352         MNEST.  Message fixes.
10353
10354         * settings.h: Comment fixes.
10355         (struct set_cust_currency) New struct.
10356         (set_cc[], set_grouping, set_seed_used) New global vars.
10357
10358         * var.h: (FMT_CCA...FMT_CCE) New output formats.
10359         (FCAT_OUTPUT_ONLY) New FCAT_* constant.
10360
10361 Thu Nov 28 23:14:07 1996  Ben Pfaff  <blp@gnu.org>
10362
10363         * glob.c: Revised variables to correspond to settings.h.
10364         (init_glob) Initializes variables from settings.h properly.
10365
10366         * set.q: Began long-overdue major revision to correspond to new
10367         philosophy.  Most code changed. 
10368
10369         * settings.h: Mostly changed; reorganized, reordered, large new
10370         comment.
10371
10372 Thu Nov 28 19:46:10 1996  Ben Pfaff  <blp@gnu.org>
10373
10374         * get.c: (cmd_save_internal) No longer forces compression off.
10375
10376         * sfm-read.c: (read_compressed_data) If eof is reached when
10377         reading a new instruction octet, only signal error if we're in the
10378         middle of a case.
10379
10380         * sfm-write.c: (COMPRESSION_BIAS) New #define.
10381         (struct sfm_fhuser_ext) New member `end'.
10382         (write_header) Refers to COMPRESSION_BIAS instead of magic 100.0.
10383         (ensure_buf_space) New function.
10384         (sfm_write_case) Reimplemented in order to support compression.
10385         (sfm_close) Writes out the remaining contents of the compression
10386         buffer if any.
10387
10388 Wed Nov 27 23:18:35 1996  Ben Pfaff  <blp@gnu.org>
10389
10390         * command.c: Defined SAVE and XSAVE commands in command table.
10391
10392         * common.h: second_lowest_value is of type flt64, not double.
10393
10394         * file-handle.h: Comment fix.
10395
10396         * get.c: Comment fixes.
10397         (static var `trns') New.
10398         (save_write_case_func, save_trns_proc, save_trns_free, null_func,
10399         cmd_save_internal, cmd_save, cmd_xsave) New functions.
10400         (dict_delete_run) Clears the variables and frees them now.
10401         (trim_dictionary) Sets default for compression.
10402         On KEEP subcommand, frees deleted variables as well as clearing
10403         them.  Finally got the sense of the test for deleting all
10404         variables correct.
10405         [DEBUGGING] (dump_dict_variables) Message fix.
10406
10407         * glob.c: (init_glob) set_compression set to 1 by default.
10408
10409         * list.q: Properly #includes config.h.
10410
10411         * misc.h: New macro REM_RND_UP.
10412
10413         * settings.h: Comment fix.
10414
10415         * sfm-read.c: (structs sysfile_header, sysfile_format,
10416         sysfile_variable; inline function bswap_int32) Moved to new file
10417         sfmP.h.
10418         (corrupt_msg) [__CHECKER__] No longer induces segfault.
10419         (sfm_read_dictionary) Fixed bug caused by failing to initialize
10420         var_by_index.
10421         (read_machine_flt64_info) Fixed some problems caused by confusion
10422         between flt64 and double types.
10423         (read_header) Message fix.
10424         (read_variables) Fixed set of cases in which we byte-swap sv.print
10425         and sv.write.  Fixed confusion of flt64 and double.
10426
10427         * sfm.h: (struct sfm_write_info) New.
10428
10429         * som-high.c: (som_draw_title) Properly frees `s'.
10430
10431         * temporary.c: (save_dictionary) Comment fix.
10432
10433         * var.h: Comment fixes.  New FMT_* enum, FMT_NUMBER_OF_FORMATS.
10434         (struct trns_header) Formatting fix.
10435         (struct save_trns) New.
10436
10437         * vars-atr.c: (discard_variables) Comment fix.
10438
10439         * sfm-write.c: New file, baseline release.
10440
10441         * sfmP.h: New file, baseline release.
10442
10443 Sun Nov 24 14:53:53 1996  Ben Pfaff  <blp@gnu.org>
10444
10445         * cmdline.c: (parse_command_line) `--version' output updated.
10446         (glob var syntax_message[]) Added my e-mail address.
10447
10448         * file-handle.q, lexer.c, vfm.c: Changed many instances of
10449         `illegal' to `invalid'.
10450
10451         * sfm-read.c: (struct sfm_fhuser_ext) New fields used as
10452         uncompression buffer.
10453         (sfm_close) Frees decompression buffer.
10454         (sfm_read_dictionary) Initializes decompression buffer.
10455         (buffer_input, read_compressed_data) New functions.
10456         (sfm_read_case) Restructured; now calls read_compressed_data() to
10457         handle compressed system file data.
10458
10459         * var.h: Comment fix.
10460
10461 Mon Nov 11 15:34:09 1996  Ben Pfaff  <blp@gnu.org>
10462
10463         * dfm.c: (dfm_close) Does not set h->{ext,class} because the
10464         caller handles it.
10465          
10466         * get.c: New comments.  New static var `get_file'.
10467         (cmd_get) Now fully implemented.  Calls discard_variables();
10468         initializes fv and lv for all variables; new debug code; sets
10469         up the dictionary; sets up the input program.
10470         (read_from_get, cancel_get) New functions.
10471
10472         * sfm-read.c: Comment fixes.
10473         (sfm_close) New static function.
10474         (sfm_read_dictionary) Properly sets up the class of the
10475         file_handle.  No longer cares what size the data is in records of
10476         type 7.  Also, on failure, properly cleans up the file_handle and
10477         free()s some stuff.
10478         (read_variables) No longer thinks it knows `nval' of the
10479         dictionary.  Now sets p.get.fv, etc., instead of speculatively
10480         setting fv itself.
10481         (read_value_labels) Fixed off-by-one error in indexing of
10482         var_by_index[].
10483         (sfm_read_case) New function.
10484         (sfm_r_class) New static var.
10485
10486         * var.h: (get_proc) New struct.
10487         (struct variable) New member p.get.
10488
10489 Thu Nov  7 20:52:28 1996  Ben Pfaff  <blp@gnu.org>
10490
10491         * get.c: Removed GTSV_OPT_MAP because of a misinterpretation of
10492         the manual's meaning.
10493         (rename_variables) New function.
10494         (trim_variables) Doesn't try to parse MAP any more.  Removed debug
10495         code.  Now properly reorders the dictionary on the KEEP keyword.
10496
10497         * sfm-read.c: (read_value_labels) Fixed some bugs regarding
10498         garbage collection.
10499
10500         * vars-atr.c: (clear_variable) New argument `dictionary *'.
10501         (rename_variable) New function.
10502         (free_val_lab) Reformatted.
10503
10504 Thu Nov  7 17:29:16 1996  Ben Pfaff  <blp@gnu.org>
10505
10506         * var.h: Reindented entire file.  Comment fixes.
10507         (glob vars var, var_by_name, nvar, N, nval, n_splits, splits)
10508         Removed.
10509         (glob var default_dict) New.
10510         (struct indirect_dictionary) Removed.
10511
10512         * Many other source files were changed to add `default_dict.'
10513         before all references to the dictionary of the active file.
10514         
10515         * vars-atr.c: (make_indirect_dictionary) Removed.
10516
10517         * glob.c: Reindented all variable declarations.  Updated for
10518         changed var.h.  Comment fixes.
10519
10520         * temporary.c: (restore_dictionary, save_dictionary) Simplified
10521         because now we can mainly copy dictionary structs.
10522
10523         * vars-prs.c: (is_dict_varname, parse_dict_variable,
10524         parse_variables) Takes dictionary instead of indirect_dictionary
10525         first argument.
10526         (parse_variables) Instead of calling make_indirect_dictionary,
10527         just sets DICT to &default_dict if DICT is NULL.  Of course, lots
10528         of `*dict.' references had to be changed to `dict->'.  Removed
10529         debug code.
10530
10531 Thu Nov  7 15:48:52 1996  Ben Pfaff  <blp@gnu.org>
10532
10533         * get.c: Added GTSV_OPT_* series of enums.
10534         (trim_dictionary, dict_delete_run) New functions.
10535         [DEBUGGING] (dump_dict_variables) New function.
10536         (cmd_get) Calls trim_dictionary() to get dictionary fully set-up.
10537         [DEBUGGING] Calls dump_dict_variables() to display results.
10538
10539         * glob.c: (cmp_variable) Now a public function declared in var.h.
10540
10541         * sfm-read.c: Turned off debug code.  Comment fixes.
10542         (read_machine_int32_info, read_machine_flt64_info) New functions
10543         to parse type 7 records.
10544         (sfm_read_dictionary) Properly byteswaps several fields now.
10545         Calls read_machine_*_info() to parse type 7 subtypes 3 and 4
10546         records.  [DEBUGGING] Dumps dictionary.
10547         (read_variables) Sets `index' field of variables created properly.
10548         Constructs avl tree of variables in dictionary.  [DEBUGGING] No
10549         longer dumps dictionary.
10550         (read_value_labels) Properly byteswaps fields.  [DEBUGGING] New
10551         debug code.
10552         [DEBUGGING] (dump_dictionary) No longer stubbed out.
10553
10554         * temporary.c: (restore_dictionary) Destroys `var_by_name' glob
10555         var before destroying any variables just to save a little time.
10556
10557         * var.h: (struct variable) Reordered in order to make name[] the
10558         first member; this makes pointers to `variable' pointers to the
10559         variable name, simplifying avl trees, etc.
10560         (struct indirect_dictionary) New struct.
10561
10562         * vars-atr.c: (find_variable) Rewritten for efficiency.
10563         (make_indirect_dictionary, is_dict_varname, parse_dict_variable)
10564         New functions.
10565         (is_varname) Rewritten for efficiency.
10566         (parse_variables) New argument, which is a `dictionary *'.  All
10567         references changed.  This function now reads variable names from
10568         the dictionary passed, or from the default dictionary if NULL.
10569
10570 Tue Nov  5 18:34:59 1996  Ben Pfaff  <blp@gnu.org>
10571
10572         * misc.h: Added new macro DIV_RND_UP to perform integer division,
10573         rounding up.  Changed many references to ROUND_UP to use this
10574         instead.
10575
10576         * sfm-read.c: Includes avl.h.
10577         (corrupt_msg) Induces a segfault under Checker.
10578         (macro assertive_bufread) New.  Many references to bufread() now
10579         use this instead.
10580         (sfm_read_dictionary) Split up into several functions.  Added code
10581         to read dictionary records following the the type 2 records.  Not
10582         quite complete.  New variable `var_by_index'.
10583         (read_header, read_variables) New functions extracted from
10584         sfm_read_dictionary().
10585         (read_value_labels) New function.
10586         (bufread) Checks ferror() if fread() doesn't return the expected
10587         value; if ferror() is zero it's just EOF.
10588         (dump_dictionary) Stubbed out.
10589
10590         * BTW: The source code now exceeds 50000 lines!
10591         
10592 Mon Nov  4 22:03:28 1996  Ben Pfaff  <blp@gnu.org>
10593
10594         * command.c: Added GET to cmd_table[].
10595
10596         * list.q: Removed reference to alloca headers.
10597         (cmd_list) Gave prototype.
10598
10599         * sfm-read.c: Added DEBUGGING comments.
10600         (sfm_read_dictionary) Checks bias correctly.  Sets
10601         dict->var_by_name to NULL.  Calculates long_string_count
10602         correctly.  realloc's dict->var[] array to minimum size.
10603         [DEBUGGING] Calls dump_dictionary.
10604         [DEBUGGING] (dump_dictionary) New function.
10605
10606         * temporary.c: (save_dictionary) Sets var_by_name to NULL.
10607         (restore_dictionary) If the dictionary contains a non-NULL
10608         var_by_name, uses that instead of generating one.
10609         (free_dictionary) Destroys var_by_name.
10610
10611         * var.h: (struct dictionary) Added field `var_by_name'.
10612
10613         * get.c: New file, not complete.
10614
10615 Sun Nov  3 12:24:36 1996  Ben Pfaff  <blp@gnu.org>
10616
10617         * mis-val.c: New enums MV_NOR_*.  New struct num_or_range.
10618         (parse_num_or_range) New function.
10619         (parse_numeric) Reimplemented in order to support LOW THRU <n> and
10620         <n> THRU HIGH missing values.
10621
10622         * output.h: [__GNUC__>1 && __OPTIMIZE__] (width, height) Made
10623         __attribute__((const)).
10624
10625         * q2c.c: (get_token) Merged isdigit || isalpha into isalnum.
10626
10627         * sfm-read.c: Finished reference implementation.
10628
10629         * sfm.h: Includes var.h.
10630
10631         * var.h: Comment fixes.
10632         (struct `variable') Reordered some fields.
10633
10634         * vars-atr.c: (is_num_user_missing) Added support for MISSING_*
10635         constants added previously.
10636
10637 Wed Oct 30 17:13:08 1996  Ben Pfaff  <blp@gnu.org>
10638
10639         * common.h: Comment fixes.  Added declaration of
10640         `second_lowest_value' as variable or macro.  Made `compat_type',
10641         `pgm_state_type' into anonymous enums.
10642
10643         * display.c: Comment fix.
10644
10645         * glob.c: [ENDIAN==UNKNOWN] Added definition for `endian' global
10646         var.
10647         [!defined SECOND_LOWEST_VALUE] Added definition for
10648         `second_lowest_value' global var.
10649         (compat, pgm_state global vars) Changed types to `int'.
10650         (init_glob) Initializes `second_lowest_value'.
10651
10652         * sfm-read.c: Continued work, not complete.
10653
10654         * var.h: Added new MISSING_* constants to handle LOWEST and
10655         HIGHEST.
10656
10657 Sat Oct 26 23:06:06 1996  Ben Pfaff  <blp@gnu.org>
10658
10659         * sfm-read.c: New file, not complete.
10660
10661         * cases.c: (vec_insert) Changed vector expansion algorithm.
10662         (vec_delete) Fixed bug that screwed up deletion sometimes, it was
10663         mucking up the RECODE transformation in particular.
10664         (envector) Harmless change in notation.
10665
10666         dfm is now fairly well tested again.  
10667         * dfm.c: (dfm_get_record) Only returns ext->ptr if ext is
10668         non-NULL--duh.
10669         (cmd_begin_data) if(ext->line) replaced by if(ext && ext->line).
10670
10671         * recode.c: Comment fix.
10672
10673         * sfm.h: Interface should be fairly final now, or at least for a
10674         day or so...
10675
10676         * vfm.c: [DEBUGGING] (index_to_varname) New function.
10677         (open_active_file) [DEBUGGING] Translates ccase indices into
10678         variable names now to make it easier to understand what's really
10679         going on.
10680
10681 Sat Oct 26 20:46:31 1996  Ben Pfaff  <blp@gnu.org>
10682
10683         * data-in.c: Comment fix.
10684
10685         * data-list.c: Includes dfm.h.
10686         (do_reading) Uses new function dfm_push_cust().
10687
10688         * data-out.c: (convert_time, convert_WKDAY, convert_MONTH) Added
10689         `return 1;' at end.
10690
10691         * file-handle.h: Completely changed.  Some parts split off into
10692         new file dfm.h.  Implemented in file-handle.q.
10693         (enum FH_*) Removed.
10694         (struct fh_ext_class) New struct.
10695         (struct file_handle) Retained only these fields: name, norm_fn,
10696         fn, recform, lrecl, mode.  New fields class, ext.
10697         (get_handle_by_name, get_handle_by_filename, parse_file_handle,
10698         close_handle, handle_name) Added `fh_' prefix to name, all
10699         references changed.
10700
10701         * dfm.h: New file, implemented in dfm.c.
10702         (get_record, put_record, fwd_record, bkwd_record, set_record,
10703         get_cur_col) Functions moved from file-handle.h, now prefixed with
10704         `dfm_'.
10705         (dfm_push_cust) New function.
10706
10707         * sfm.h: New file.  Incomplete.
10708
10709         * dfm.c: All functions adjusted/rewritten for new dfm/fhp
10710         interface.  Functions reordered, comments changed.  Not well
10711         tested, probably full of bugs.
10712         (struct dfm_fhuser_ext) New struct.
10713         (dfm_close) New function.
10714         (open_file_r) Pickier about finding `BEGIN DATA.' line.
10715         (open_file_w) User messages changed.
10716         (get_record) Comment fixed.
10717         (read_record) Increments ext->ln even for inline_file.  Calls
10718         dfm_close() for inline_file when `END DATA.' encountered.
10719         (dfm_get_record) Experimental restructuring.
10720         (dfm_push_cust) New function.
10721         (cmd_begin_data) Detects whether the inline file was fully read by
10722         checking whether it is still open; detects whether it was read at
10723         all by checking whether the line number is greater than zero.
10724
10725         * file-handle.q: All functions adjust/rewritten for new dfm/fhp
10726         interface.  Functions reordered, comments changed.  Not well
10727         tested, probably full of bugs.
10728         (init_file_handle) Removed initializers for obsolete fields, added
10729         new fields.
10730         (fh_close_handle) Much simpler, now mainly calls the class
10731         function.
10732         (fh_init_files) Renamed inline file internal filename.
10733
10734         * file-type.c: Includes dfm.h.
10735         (read_from_file_type) Doesn't use dfm internal state anymore.
10736
10737         * inpt-pgm.c, print.c: Include dfm.h.
10738
10739         * recode.c: (internal_cmd_recode) Casts strlen() return value to
10740         int in comparison with other int.
10741
10742         * som-high.c: (build_target) Fixed operator precedence problem in
10743         if statement (& versus ==).
10744
10745 Sat Oct 26 10:39:25 1996  Ben Pfaff  <blp@gnu.org>
10746
10747         * dfm.c: (read_record) Can now read fixed-length records; not
10748         tested.
10749         (put_record) Can now write fixed-length records; not tested.
10750
10751         * file-handle.h: FH_* defines changed to enums.  New enum series
10752         FH_RF_*, FH_MD_*.
10753         (struct file_handle) New members recform, lrecl, mode.
10754
10755         * file-handle.q: Parser changed.
10756         (internal_cmd_file_handle) Added support for new /RECFORM, /MODE,
10757         /LRECL subcommands.  These are compatible with Windows.
10758         (init_file_handle) Initializes recform, mode fields.
10759
10760         * q2c.c: (get_line) When outputting `!' comment lines, now
10761         increments the output file line number so that `#line' directives
10762         are correct.
10763         (make_identifier) New function that converts an arbitrary string
10764         into a valid C identifier.
10765         (dump_vars) Calls make_identifier() in two places in order to
10766         suppress some errors for bad identifiers.
10767         (make_match) Allows TRUE as synonym for YES and FALSE as synonym
10768         for NO.  Allows numbers to be prefixed by underscores to make them
10769         acceptable C identifiers but still to be parsed as numbers by the
10770         Fiasco lexer.
10771
10772 Thu Oct 24 20:13:42 1996  Ben Pfaff  <blp@gnu.org>
10773
10774         * command.c: Re-enabled RECODE, SAMPLE, SELECT IF.
10775         
10776         * dfm.c: Comment fixes. (get_record) Gives error if file handle
10777         was opened for writing.
10778         (open_file_w) New function.
10779         (read_record) Uses strncasecmp if available.  Improved error
10780         messages, comments.
10781         (put_record) New function.
10782
10783         * file-handle.h: Moved function comments into dfm.c and
10784         file-handle.q.  Comment fixes.  Removed declarations of
10785         tilde_expand() and normalize_filename().
10786         (struct file_handle) Changed `open' from boolean to enumerated
10787         field to allow for three states--closed, open for reading, open
10788         for writing--all references changed.
10789
10790         * file-handle.q: Includes filename.h.
10791
10792         * print.c: (CMD_* enums) Renamed PRT_* and moved into var.h; all
10793         references changed.
10794         (alloc_line) Makes allowance for line terminator characters in
10795         calculations.
10796         (print_trns_proc) Now handles OUTFILE, WRITE differences.
10797         (print_space_trns_proc) Handles OUTFILE differences.
10798
10799         * recode.c, sample.c: Comment fixes.
10800
10801         * var.h: (struct print_trns) Changed boolean field `eject' to
10802         bitmapped field `options'; all references changed.  New enums
10803         PRT_* for use with this field.
10804
10805         * exception.h, test-exception.c: Removed.
10806
10807 Thu Oct 24 17:47:14 1996  Ben Pfaff  <blp@gnu.org>
10808
10809         * ascii.c: (delineate) Turned off debug output.
10810
10811         * common.c: [Checker and Linux] (__assert_fail, __eprintf) Moved
10812         to error.c.
10813
10814         * data-in.c: (parse_string_as_format) Sets the entire string value
10815         to spaces, not just the short string part of it.  Is this correct
10816         now? 
10817
10818         * data-out.c: (convert_date) Fixed DATETIME format problems with
10819         decimal places, removed debug code.
10820
10821         * dfm.c: (open_file_r) Fixed bug where an error would occur in the
10822         middle of parsing BEGIN DATA that would cause the lexer to read
10823         from a wild pointer `prog'; now calls new function
10824         preprocess_line() in lexer.c.
10825
10826         * error.c: [__CHECKER__] (hcf) Calls induce_segfault() on improper
10827         termination.
10828         [Checker and Linux] (__assert_fail, _eprintf) Moved from common.c.
10829         Now call induce_segfault() to induce the segfault.
10830         (induce_segfault) New function.
10831
10832         * expr-opt.c: Comment fix.
10833         (parse_sysvar) New function.
10834         (parse_primary) Added system variable support--calls
10835         parse_sysvar().
10836         (global var ops) Added OP_CASENUM operator.
10837
10838         * expr.h: Comment fixes.
10839         (OP_* enum) added OP_CASENUM operator.
10840         (struct casenum_node) New struct.
10841         (union any_union_union) New member `cas' of type `casenum_node'.
10842
10843         * glob.c: (global var last_vfm_invocation) New var.
10844         (init_glob) Initializes last_vfm_invocation.
10845
10846         * lexer.c: (lookahead) Fixed reversed condition on if statement.
10847
10848         * getline.c: (get_line) Split into get_line() and preprocess_line().
10849         (preprocess_line) New function.
10850
10851         * var.h: Declares last_vfm_invocation.
10852
10853         * vfm.c: (procedure) Sets last_vfm_invocation.
10854
10855 Wed Oct 23 21:53:43 1996  Ben Pfaff  <blp@gnu.org>
10856
10857         * command.c: (parse_cmd) Fixed bad assertion related to
10858         lookahead().
10859
10860         * data-in.c: (parse_month) Implemented to parse months according
10861         to full interpretation of standard.
10862         (to_roman) New function.
10863         (parse_wk_delimiter) Bug fix (forgot to skip `WK' in string).
10864         (parse_weekday) Bug fix (forgot to skip all the day name).
10865
10866         * data-list.c: (read_from_data_list_fixed) Fixed bug that screwed
10867         up parsing of multirecord data items.  Also fixed user message.
10868
10869         * data-out.c: Comment fix.
10870         (year2, year4, convert_date, convert_time, convert_WKDAY,
10871         convert_MONTH) New functions to support time & date output.
10872         (convert_format_to_string) Calls new time & date output routines.
10873
10874         * expr-prs.c: (nary_num_func) Found a bug, but didn't fix it yet.
10875
10876         * lexer.c: (lookahead) Noted a previously unnoticed caveat in
10877         comment.
10878
10879         * main.c: [DEBUGGING] (dump_token) Updated to handle getline.h.
10880
10881         * misc.c: (global var formats) Fixed declarations of DATETIME,
10882         TIME, DTIME.
10883
10884         * postscript.c: (text) Fixed a pair of bugs in the reallocation of
10885         the output_char buffer.
10886
10887         * vars-prs.c: (parse_DATA_LIST_vars) Fixed a failure to free
10888         memory bug.  Fixed user messages.
10889
10890 Tue Oct 22 17:27:04 1996  Ben Pfaff  <blp@gnu.org>
10891
10892         * Removed #pragma argsused from lots of places.
10893         
10894         * data-in.c: Implemented zoned decimal and time-date formats.
10895         Untested.  This is a huge chunk of code--maybe 1000 lines and 50
10896         new functions.
10897
10898         * data-out.c: Implemented zoned decimal format.
10899
10900         * expr.h: Moved yrmoda() declaration here from exprP.h.
10901
10902         * misc.c: (global var formats) Minor fixes--added
10903         FCAT_SHIFT_DECIMAL to formats N and Z.
10904         (convert_fmt_ItoO) Added support for format Z.
10905
10906         * som-frnt.c: (som_set_value) Fixed bug regarding string values.
10907
10908 Mon Oct 21 20:39:59 1996  Ben Pfaff  <blp@gnu.org>
10909
10910         * command.c: (parse_cmd) [GLOBAL_DEBUGGING] Inserted call to
10911         som_check_workspace() that is activated between commands.
10912
10913         * data-list.c: (dump_fixed_table, dump_free_table) Finished these
10914         for good, I hope.
10915
10916         * list.q: (begin_row) Changed title expansion style from
10917         SOPT_X_VERT to SOPT_X_SHSP.
10918
10919         * som-frnt.c: Now includes `somP.h'.
10920         (som_push_workspace, som_pop_workspace) New functions that, taken
10921         together, form a solution to the recursive table building problem
10922         mentioned yesterday.  Surrounded every table output routine
10923         throughout the program with calls to these functions.
10924         [GLOBAL_DEBUGGING] (som_check_workspace) New function.
10925         (som_create_table) Checks that there's an active workspace.
10926         (som_destroy_all_tables, som_crush) Removed.
10927
10928         * som-high.c: (global var som_preserve_tables) Removed, all
10929         references deleted.
10930         (som_submit_table) Checks that there's an active workspace.
10931         (dump_columnated_table) Doesn't columnate tables that would have
10932         just one row per column.
10933         (dump_crush_page, som_dump_crush_page) Removed debugging code.
10934         (som_dump_crush_page) Moved row number labels from left side of
10935         tables to right side.
10936         (som_get_table_size) Added support for SOPT_X_SHSP.
10937
10938         * som.h: New cell expansion type SOPT_X_SHSP.
10939
10940         * somP.h: (global vars arena_stack, n_arena_stack, m_arena_stack)
10941         New vars.
10942         (global var curtab_arena) Moved from som-frnt.c.
10943
10944 Sun Oct 20 13:45:28 1996  Ben Pfaff  <blp@gnu.org>
10945
10946         * ascii.c: [GLOBAL_DEBUGGING] (SUPPRESS_WARNINGS) New debug option
10947         that causes bad location warnings to be suppressed.
10948         (delineate) Saves current font when calling draw_text(); fixed
10949         handling of NULLs when backing up.  Also fixed line-wrapping bug.
10950
10951         * command.c: Re-enabled `LEAVE', `NUMERIC', `PRINT', `PRINT EJECT',
10952         `PRINT FORMATS', `PRINT SPACE', `STRING', `TITLE', `WRITE'.
10953
10954         * common.c: Added code to cause assertion failure to dump core
10955         when run under Checker.
10956
10957         * data-list.c: (dump_fixed_table) Fixed some inconsistencies, but
10958         there are still bugs.
10959
10960         * glob.c: (__eprintf) Removed.
10961
10962         * list.q: Inserted som_preserve_tables kluge that prevents tables
10963         from being thrown away due to recursive table building through
10964         som_output_line being called from a transformation during the LIST
10965         procedure invocation.  This is a general problem that must be
10966         solved in a better way since it applies to all procedures in
10967         general.
10968         (begin_row) Changed title options to SOM_X_VERT from SOM_X_BOTH.
10969         (flush_table) Removed SOM_TOPT_PRESERVE from submission options.
10970
10971         * numeric.c: Fixed several errors in the form of msg() calls.
10972
10973         * print.c: Updated for use of som.
10974         (dump_table) Reimplemented.
10975         (print_trns_proc) Calls som_eject_page() instead of eject_page().
10976         Calls som_output_text() instead of outs_line().
10977
10978         * som-frnt.c: (som_destroy_all_tables) Sets som_preserve_tables to
10979         0.
10980         (som_output_text) Function moved from som-low.c.  Interface
10981         changed.
10982
10983         * som-high.c: (som_preserve_tables) New global public variable
10984         declared in som.h.
10985         (som_submit_table) Destroys the tables only if som_preserve_tables
10986         is 0.
10987         (paginate_horizontally) Bugfix: sets som.mpw even if there's only
10988         one subrow per row.  Now labels subrows if there's more than one
10989         subrow per row.
10990         (dump_crush_table) Added wishlist comment.
10991         (som_eject_page) New public function declared in som.h.
10992
10993         * som-low.c: (som_dump_crush_page) Draws row labels if there's
10994         more than one subrow per row.
10995         (som_output_text) Moved to som-frnt.c.
10996
10997         * som.h: (SOM_TOPT_PRESERVE) Removed.
10998
10999         * title.c: (get_title) Changed interface.
11000         (cmd_title) Changed `title' to `outp_title'.
11001         (cmd_subtitle) Changed `subtitle' to `outp_subtitle'.
11002
11003 Sun Oct 20 09:04:15 1996  Ben Pfaff  <blp@gnu.org>
11004
11005         * list.q: (flush_table) Conforms to new partial options in
11006         som_submission_form.
11007
11008         * som-high.c: (paginate_horizontally) Changed form of subrow
11009         number labels.
11010         (build_target) Omits spacing before table if
11011         SOM_TOPT_PARTIAL_OMIT_TOP is selected.
11012         (dump_crush_page) Changed interface.  Only trims bottom rule if
11013         SOM_TOPT_PARTIAL_OMIT_BTM is not selected.
11014         (dump_crush_table) Handles partial tables.
11015         (output_row_label) New function.
11016         (som_dump_crush_page) Emits subrow number labels.  Draws vertical
11017         rule on the right edge of narrow subrows.
11018
11019         * som.h: Changed SOM_SUB_PARTIAL_* series of submission type
11020         constants to a series of SOM_TOPT_PARTIAL_* submission options.
11021         All references updated.
11022
11023 Fri Oct 18 19:46:49 1996  Ben Pfaff  <blp@gnu.org>
11024
11025         * misc.c: Comment fix.
11026
11027         * som-high.c: (examine_table) Treats crushed tables separates for
11028         purpose of determining header size.
11029         (paginate_horizontally) Allots space for line numbers in crushed
11030         tables with lots of subrows per row.  Calculates the `maximum page
11031         width', the width of the widest horizontal page.
11032         (build_target) Removed trim argument; all references changed.
11033         Stricter assertions.  (dump_crush_page) New function.
11034         (dump_crush_table) Reimplemented.
11035
11036         * som-low.c: (som_dump_page) Uses new RULE_ROW &c. constants.
11037         (som_dump_crush_page) Reimplemented, interface changed.
11038
11039         * somP.h: Many many new helper macros for use with crushed tables.
11040         (global var som) Removed `tv', `cum_y' members; all references
11041         removed.  New members `mpw', `digit_space'.
11042
11043 Sun Sep 29 19:37:03 1996  Ben Pfaff  <blp@gnu.org>
11044
11045         * arena.c: (arena_alloc) [!DISCRETE_BLOCKS] Removed `size'
11046         variable, changed to constant 1024.
11047         (arena_ca_strdup) Changed `sizeof(a_string)' to
11048         `sizeof(c_string)'.
11049         (arena_ca_strdup) [!DISCRETE_BLOCKS] Changed bad cast from
11050         `(c_string *)' to `(char *)'; this fixed some offset problems.
11051
11052         * filename.c: (readlink_malloc) Changed initial allocation from
11053         100 bytes to 128.
11054         (good_getcwd) Changed from xmalloc() to local_alloc(); removed
11055         comment.
11056
11057         * postscript.c: (read_fontmap) Fixed leak by changing &owner to
11058         &fm->owner in several places.
11059
11060         * som-high.c: (output_table) Changed interface to rest of world.
11061         (examine_crush_table) Removed.  Crushed tables are re-broken now,
11062         in preparation for rewrite.
11063
11064         * som.h: Comment fix.
11065
11066 Sat Sep 28 21:28:07 1996  Ben Pfaff  <blp@gnu.org>
11067
11068         * ascii.c: (ascii_init_driver) Disposes of x->file.filename and x
11069         itself in the cleanup stage.
11070
11071         * descript.q: (display) At least temporarily, changed the table
11072         format to a crushed table.
11073
11074         * list.q: (begin_row) At least temporarily, added horizontal lines
11075         between cases.
11076
11077         * som-high.c: (examine_crush_table) Sets som.hh to the width of
11078         the horizontal "headers," that is, to the width of the far left
11079         and far right rules.
11080         (justify_pagination) Sets som.th to the width of the widest row
11081         in the crushed table.  Fixed inner loop off-by-one error.
11082
11083         * som-low.c: (som_dump_crush_page) Added code to draw horizontal
11084         rules.
11085
11086         * somP.h: Comment fix.
11087
11088 Fri Sep 27 20:08:39 1996  Ben Pfaff  <blp@gnu.org>
11089
11090         * filename.c: (open_file_ext) Now, doesn't set f->file to NULL
11091         before closing it; also, opens the constructed filename `s'
11092         instead of f->filename.
11093
11094         * postscript.c: Moved initialization of x->loaded, x->prop,
11095         x->fixed, x->current, also the add_encoding() calls, into
11096         postopen().
11097         (preclose) Destroys x->combos; sets x->loaded, x->combos to NULL;
11098         sets x->last_font to NULL; sets x->next_combo to zero.
11099
11100         * som-high.c: (crushed_row_height) Moved definition farther up.
11101         (som_submit_table) Doesn't calculate line width, font size until
11102         after calling open_page(), to accomodate changes to PostScript
11103         driver.
11104         (vert_headers) Removed; equivalent functionality moved to
11105         examine_table(), examine_crush_table().
11106         (justify_pagination) Replaced with different algorithm.
11107         (dump_crush_table) Bugfix that caused tables to fail to be clipped
11108         at the bottom of the page.
11109
11110 Thu Sep 26 22:20:26 1996  Ben Pfaff  <blp@gnu.org>
11111
11112         * command.c: Added cmd_list back into cmd_table.
11113
11114         * freq.c, frequencies.q, repeat.c, list.q, vars-atr.c, vfm.c:
11115         Comment fix: `#define DEBUGGING' --> `#define DEBUGGING 1'.
11116
11117         * list.q: (flush_table) Updated to new som_submission_form format.
11118
11119         * som-frnt.c: Comment fix.
11120
11121         * som-high.c: Changed `#endif' to `#undef EXTERN'.
11122         (output_table) Calls som_get_table_size() directly; handles
11123         crushed tables.
11124         (examine_crush_table) New function; calls vert_headers().
11125         (examine_table) Moved some code into new function, vert_headers().
11126         (justify_pagination) New function.
11127         (dump_plain_table) Removed `static' from `cy'.
11128         (dump_crush_table) New function.
11129
11130         * som-low.c: (som_dump_crush_page) New function.
11131
11132         * som.h: Comment fixes.
11133         (enum SOM_TOPT_CRUSH) New.
11134         (SOM_SUB_PARTIAL_BEG, SOM_SUB_PARTIAL_MID, SOM_SUB_PARTIAL_END)
11135         Temporarily set to zero to make do with LIST procedure.
11136
11137         * somP.h: Re-ordering.
11138
11139 Wed Sep 25 19:36:11 1996  Ben Pfaff  <blp@gnu.org>
11140
11141         * som.c: Split into som-frnt.c, som-high.c, som-low.c.
11142
11143         * somP.h: New file for use by som-high.c, som-low.c.
11144
11145         * q2c.c: Added definition for VME.
11146         (get_line) Now dumps `!' comment lines to the output file
11147         verbatim.
11148
11149         * crosstabs.q, descript.q, file-handle.q, frequencies.q, list.q,
11150         set.q: Changed format of `!' comment lines.
11151
11152 Tue Sep 24 18:39:09 1996  Ben Pfaff  <blp@gnu.org>
11153
11154         * All source files: Added copyright notice.
11155
11156         * common.c: (xmalloc, xrealloc, xstrdup) Cast size_t's to unsigned
11157         longs in msg() calls.
11158
11159         * con32s.c: (xmalloc, xrealloc) Updated from common.c.
11160
11161         * q2c.c: (xmalloc, xrealloc, xstrdup) Updated from common.c.
11162
11163 Sat Sep 21 23:16:31 1996  Ben Pfaff  <blp@gnu.org>
11164
11165         * output.c: (outp_read_devices) Changed criteria for
11166         distinguishing different types of lines.
11167
11168 Fri Sep 20 22:52:28 1996  Ben Pfaff  <blp@gnu.org>
11169
11170         * cmdline.c: Changed syntax message.
11171
11172         * filename.c: (good_getcwd) Bug fix (?).
11173         (normalize_filename) [__BORLANDC__] Uses _fullpath() library
11174         function.
11175         (search_path) Appends DIR_SEPARATOR to directory name only if it
11176         does not already end with one.
11177
11178         * glob.c: Checks STAT_PAGER envvar before PAGER.
11179
11180         * output.c: Checks environment variables instead of just local
11181         macros.
11182
11183 Tue Sep 10 21:39:00 1996  Ben Pfaff  <blp@gnu.org>
11184
11185         * arena.c: (arena_destroy) Swatted a subtle bug that cropped up
11186         when the pointer passed to the function was within the arena
11187         itself, so that it couldn't properly be set to NULL _after the
11188         arena was freed_.
11189
11190         * command.c: Re-enabled DISPLAY.
11191
11192         * display.c: Rewritten to handle tables.  Untested.
11193
11194         * filename.c: (search_path) Fixed memory leak.
11195
11196         * frequencies.q: (cmd_frequencies) Frees v_variables.
11197         (postcalc) Calls cleanup_freq_tab() after displaying statistics.
11198         (cleanup_freq_tab) New function to garbage collect.
11199         (dump_full) Elegantized.
11200
11201         * main.c: New comment.
11202
11203         * output.h: New tag for tagged quotes: TAG_NEWLINE.
11204
11205         * postscript.c: Comment fix.
11206         (release_fontmap, free_font_entry) New functions.
11207         (ps_init_driver) Sets free_font_entry() as the freefunc for
11208         hashtable `loaded'.  Calls release_fontmap() when destroying a
11209         driver; also frees the output filename; also frees the
11210         ps_driver_ext block.
11211         (free_ps_encoding) Frees the filename as well as the encoding
11212         block.
11213         (output_encodings) Frees the line buffer and pops the msg-filename
11214         stack.
11215         (read_fontmap) Frees the fontmap filename and the line buffer.
11216         (postopen, preclose) Misc. garbage collection fixes.
11217         (ps_open_page) Destroys the `combos' hash table; sets `last_font'
11218         to NULL; this fixes some output problems.
11219         (text) Handles TAG_NEWLINE.  Untested.
11220
11221         * som.c: (cell_byte_size) Merged SCON_VALUE and SCON_TEXT cases.
11222         (som_set_string) Removed.  All references changed to
11223         `som_set_text'.
11224         (som_set_text) Rewritten.  New interface.  More general.
11225
11226         * som.h: Minor format changes.
11227         (struct som_value_cell) Removed; all references changed to
11228         `som_text_cell'.
11229         (enums SOT_*) Changed.
11230
11231 Mon Sep  9 21:43:13 1996  Ben Pfaff  <blp@gnu.org>
11232
11233         * command.c: Re-enabled SPLIT FILE.
11234
11235         * postscript.c: Comment fix.
11236
11237         * som.h: Added `SOT_NONE'.
11238
11239         * split-file.h: (cmd_split_file) Removed superfluous parenthesis.
11240
11241         * vfm.c: (dump_splits) Reimplemented.
11242
11243 Sat Sep  7 22:35:12 1996  Ben Pfaff  <blp@gnu.org>
11244
11245         * Compiled the project under gcc 2.7.2, which gave some new
11246         warnings.  This led to many additions of casts from unsigned to
11247         int sprinkled throughout the code.
11248         
11249         * arena.c: Many uses of `unsigned' changed to `size_t'.
11250
11251         * command.c: Added END FILE, END REPEAT to command table.
11252         (var cmd_end_repeat) Renamed cmd_end_repeat_p.
11253         (find_command, FILE_TYPE_okay) Not commented out anymore.
11254         (parse_cmd) Calls FILE_TYPE_okay again.
11255         (output_line) Added calls to som_output_text() to put the line
11256         in the output files.
11257
11258         * common.c: (macro VME) Format changes.
11259         (xstrdup) Asserts that its argument is not NULL.
11260         
11261         * data-list.c: Implemented dump_fixed_table().
11262         
11263         * inpt-pgm.c: Formatting changes.  Comment changes.
11264         (end_case_proc) Renamed end_case_trns_proc.
11265         (cmd_end_file, end_file_trns_proc) New functions.
11266
11267         * misc.c: Many uses of `int' and `unsigned' changed to `size_t'.
11268
11269         * misc.h: (local_strdup) New macro corresponding to strdup() but
11270         allocating its data through local_alloc() if possible--that is, if
11271         GNU C is in use.
11272
11273         * postscript.c: Comment changes.
11274         (quote_ps_name, quote_ps_string, output_encodings) New functions.
11275         (output_line, add_string) New macros supporting
11276         output_encodings().
11277         (postopen) Fixed contents of ${fixed-font} and ${prop-font}
11278         substitution vars.  Calls output_encodings() when a line
11279         consisting of `!encodings' is encountered.
11280         (preclose) Some code moved into quote_ps_string().
11281         (dump_line) Changed into macro supporting dump_fancy_line().
11282         (switch_font) Now outputs DSC "%%IncludeResource: font (...)"
11283         command when appropriate.
11284         (write_text) Fixed `literal_char' array (I think it's fixed, at
11285         least.)
11286         (text) Fixed bug when width was zero.  Now exits immediately on
11287         zero height_left.  Now, when executing `goto restart;', checks
11288         that cp<end, so that we don't read beyond end-of-string.  Also,
11289         outputs the correct code to the output file by outputting the code
11290         from the metric instead of the internal metric index.
11291
11292         * repeat.c: (cmd_end_repeat) New function.
11293
11294         * som.c: (var som) `headers' renamed `options' and semantics
11295         changed.  All references changed.
11296         (draw_title) `if(px!=-1 || px!=-1)' --> `if(px!=-1 || py!=-1)'.
11297         (build_target) Only inserts spacing if SOM_TOPT_SPACING not
11298         selected.
11299         (som_text_table) Removed.
11300         (som_output_text) New function.
11301
11302         * som.h: (struct som_submission_form) Removed `header', `reuse',
11303         replaced with bitmapped field `options'.
11304         (SOM_TOPT_*) New enum set for som_submission_form.options.
11305         (SOT_*) New enum set for som_output_text().
11306
11307         * temporary.c: (copy_variable) When copying the var label, only
11308         calls xstrdup() if it's non-NULL.
11309
11310         * var.h: (enum type `vartype') Removed; all references changed to
11311         `int'.
11312
11313         * vars-atr.c: (init_variable) Changed local var `nbytes' from
11314         `int' to `size_t'.
11315
11316 Thu Sep  5 22:05:56 1996  Ben Pfaff  <blp@gnu.org>
11317
11318         * font.h: Comment changes.
11319
11320         * groff-font.c: (groff_read_font) Initializes `name' field to
11321         NULL.  Handles `encoding' field.
11322
11323         * hash.c: (hsh_dump) [GLOBAL_DEBUGGING] Output formatting changes.
11324
11325         * postscript.c: (struct font_entry) Removed `position' field.
11326         (struct ps_font_combo) New struct.
11327         (struct ps_driver_ext) Removed field `next_position'.  New fields
11328         `combos', `next_combo'.  `last_font' field changed from
11329         `font_entry *' to `ps_font_combo *'.
11330         (ps_init_driver) Reformatted; handles new fields.  When
11331         OPO_AUTO_ENCODE is set, adds the two default fonts' encodings to
11332         the encoding list.
11333         (get_encoding, find_encoding_file) New functions.
11334         (add_encoding) Some code moved out into find_encoding_file().
11335         (postopen) Changed value for ${title}.
11336         (preclose) Sets `loaded' field to NULL after destroying the hash
11337         table.
11338         (ps_open_page) Added comment.  Inits the `combos' and `next_combo'
11339         fields.
11340         (ps_text_set_font_by_position) Figures out the current family if
11341         not known.
11342         (compare_ps_combo, hash_ps_combo, free_ps_combo) New functions.
11343         (switch_font) Implemented.
11344         (write_text) Calls switch_font() more often.  Format changes.
11345         #undefs its macros after they're no longer useful.
11346         (text) Changed `continue' at one point to a jump to the top of the
11347         loop because we don't want `separate' reset to 0 at that point.
11348         (load_font) No longer sets `position' in the font_entry created.
11349
11350 Wed Sep  4 21:45:35 1996  Ben Pfaff  <blp@gnu.org>
11351
11352         * font.h: (struct font_desc) New member `encoding', which is not
11353         properly handled yet.
11354
11355         * glob.c: (init_glob) Some new i18n code, which is probably
11356         screwed up.
11357
11358         * output.c: (outp_read_devices, outp_get_paper_size) Changed
11359         `size' local from `int' to `size_t'.
11360
11361         * postscript.c: New driver configuration parameter `auto-encode'.
11362         New enums OPO_AUTO_ENCODE, ODA_COUNT.
11363         (struct font_entry) New member `position'.
11364         (struct ps_driver_ext) Reordered.  New hash table member
11365         `encodings'; new members `next_position', `next_encoding',
11366         `last_font'.  Members `current', `prop', `fixed' changed from type
11367         `font_desc *' to `font_entry *'; all references changed.
11368         (struct ps_encoding) New struct.
11369         (read_ps_encodings, compare_ps_encoding, hash_ps_encoding,
11370         free_ps_encoding, add_encoding) New functions.
11371         (ps_init_driver) Added OPO_AUTO_ENCODE to default
11372         x->output_options.  Initializes new members of ps_driver_ext.
11373         Changed default value for prologue_fn, encoding_fn.  Calls
11374         read_ps_encodings after loading default fonts.
11375         (option_tab[], ps_option) Handle new configuration parameter.
11376         (switch_font) New function.
11377         (struct output_char) `font' member changed from `font_desc *' to
11378         `font_entry *'.  New member `separate'.
11379         (read_fontmap) Changed `size' from `int' to `size_t'.
11380         (output_line, put_number) New macros for write_text().
11381         (write_text) Optimizes text output by consolidating multiple
11382         calls to PostScript `show' operator.
11383         (text) Keeps track of when text arguments can't be consolidated by
11384         write_text(), and marks those spots in the output stream.
11385         (load_font) Sets `position' of the allocated font_entry to -1, cuz
11386         the font hasn't been switched to by switch_font(), which is where
11387         the position is important--the PostScript is what cares about the
11388         position.
11389
11390 Sat Aug 31 23:52:38 1996  Ben Pfaff  <blp@gnu.org>
11391
11392         * hash.c: (hsh_destroy) Ignores NULL argument.  Doesn't try to
11393         call a NULL free_func.
11394         (hsh_rehash) Elegantized.
11395         (hsh_probe) Fix bug that manifested when the table was expanded
11396         and thus had to change location in memory.  Good thing
11397         too--otherwise could have been much more subtle.
11398         (hsh_find) [GLOBAL_DEBUGGING] Not stubbed out anymore.
11399         (hsh_foreach) New function for hash table iteration.
11400
11401         * hash.h: (struct hsh_iterator) New.
11402
11403         * lexer.c: (parse_tagged_quote) Font and family name strings in
11404         tags are now null-terminated.
11405
11406         * output.c: (outp_evaluate_dimension) Fixed over-aggressive unit
11407         parsing.
11408         (internal_get_paper_size, outp_get_paper_size) Fixed; now work as
11409         documented.  (Never before tested?)
11410
11411         * output.h: Comment changes.
11412
11413         * postscript.c: New driver options `optimize-text-size',
11414         `optimize-line-size', `max-fonts-simult'.  New enum set for
11415         specing cached line types.  Comment fixes.
11416         (struct line_form) New struct.
11417         (struct ps_driver_struct) New members `text_opt', `line_opt',
11418         `max_fonts', `lines'.
11419         (ps_init_driver) Initializes new members of ps_driver_struct.
11420         (user option type enum set) New member `nonneg_int_arg'.
11421         (static var option_tab[]) Supports new options.
11422         (ps_option) Handles new options.
11423         (find_ps_file) Made static.  No longer calls hsh_dump().
11424         (ps_get_var) Made static.
11425         (preclose) Dumps out proper DSC trailer.
11426         (ps_open_page) Elegantized.
11427         (ps_close_page) Calls dump_lines() if appropriate.
11428         (ps_line_horz, ps_line_vert, ps_line_intersection) Reduced to
11429         wrappers around line().
11430         (int_2_compare, compare_line, dump_line, dump_fancy_line,
11431         dump_lines, hash_line, free_line, line) New functions for support
11432         of line caching.
11433         (write_text, text) Made static.
11434         (text) Added to font support, not finished.
11435
11436 Thu Aug 29 21:36:41 1996  Ben Pfaff  <blp@gnu.org>
11437
11438         * font.h: (struct font_desc) New members ascent, descent.
11439
11440         * groff-font.c: (groff_read_font) Calculates font ascent and
11441         descent from the ascent and descent of the `d' and `p' characters,
11442         respectively, as per a suggestion on comp.fonts.
11443
11444         * postscript.c: (ps_open_page, ps_close_page, ps_line_horz,
11445         ps_line_vert, ps_line_intersection) Rewritten to deal with changed
11446         prologue.
11447         (write_text) Handles text right-justification and centering (not
11448         full justification).  Still very inefficient.  (One output line
11449         per character?!)
11450         (struct output_char) Added fields for font and font size.
11451         (text) Many bugfixes.
11452
11453 Sat Aug 24 23:26:00 1996  Ben Pfaff  <blp@gnu.org>
11454
11455         * cmdline.c: (usage) Calls outp_list_classes().
11456
11457         * font.h: Comment fix.
11458
11459         * groff-font.c: New exported global var `space_index'.
11460         (groff_init) New function to initialize `space_index'.
11461         (hash_kern) Casts result to unsigned.
11462         (font_name_to_index) Renamed font_char_name_to_index.  All
11463         references changed.  Also, now returns the value of `space_index'
11464         when passed an ASCII space character as an argument.  Fixed
11465         handling of nulls.
11466         (font_get_kern_adjust) Changed i from `int' to `unsigned'.
11467         Handles passed NULL pointers properly.
11468
11469         * lexer.c: (parse_tagged_quote) Comment fix.  Better range
11470         checking.
11471
11472         * output.c: (outp_list_drivers) Removed.  Removed all references.
11473         
11474         * output.h: Comment fixes.
11475
11476         * postscript.c: (ps_open_global) Calls groff_init().
11477         (output_char) New structure.
11478         (write_text) New function.
11479         (text) No longer stubbed out!  Now the output is correct--with a
11480         few exceptions, one of them being that the page has to be held
11481         upside down into a mirror.
11482
11483 Sun Aug 11 21:31:22 1996  Ben Pfaff  <blp@gnu.org>
11484
11485         * font.h: Comment fix.
11486         
11487         * font.c: (name_to_index) Renamed font_name_to_index, made extern.
11488         All callers changed.
11489         (number_to_index) Renamed font_number_to_index, made extern.  All
11490         callers changed.
11491         (font_get_kern_adjust, font_get_char_metrics) New functions.
11492
11493         * output.h: New constant OUTP_T_INTERNAL_DRAW.
11494
11495         * postscript.c: Changed default line width back to 1/2 point.
11496         (ps_line_horz, ps_line_vert, ps_line_intersection) Now lines are
11497         in the center of the space allotted for them, not just a fixed
11498         offset from the edge of the space; this fixes some bugs.
11499         (ps_line_intersection) Now supports all command line styles.
11500         (ps_text_get_size) Bug fix in computation of em width.
11501         (text) New function, the meat behind ps_text_metrics and
11502         ps_text_draw.  Not complete.
11503         (ps_text_metrics, ps_text_draw) Removed the stub taken from
11504         ascii.c; call text().
11505
11506 Sat Aug 10 23:28:17 1996  Ben Pfaff  <blp@gnu.org>
11507
11508         * arena.c: (arena_free) Assert that the argument is non-NULL.
11509         
11510         * groff-font.c: (add_kern) Calls arena_free() for old_kern if and
11511         only if old_kern is non-NULL.
11512
11513         * postscript.c: (ps_init_driver) Changed default line width to 1
11514         point.
11515         (postopen) New prologue variables.
11516         (ps_line_horz, ps_line_vert, ps_line_intersection) Implements some
11517         more of the common line styles properly, but not all.
11518         (ps_text_metrics) Fixed problem with this stubbed out version that
11519         kept it from taking font sizes into account.
11520
11521 Thu Aug  8 22:31:11 1996  Ben Pfaff  <blp@gnu.org>
11522
11523         * arena.c: (arena_malloc) Bug fix.
11524         (arena_dump) [GLOBAL_DEBUGGING] New function.
11525
11526         * ascii.c: Comment fix.
11527         (count_fancy_chars, delineate) Now static functions.
11528         
11529         * filename.c: (interp_vars) Bug fixes.
11530
11531         * font.h: Comment fixes.
11532
11533         * glob.c: (init_glob) Sets set_viewwidth, set_viewlength at
11534         beginning in case we have an error message to display before
11535         initializing the display.
11536
11537         * groff-font.c: Comment fix.  Changed rehash threshold from 2/3
11538         full to 1/2 full.
11539         (groff_read_font) Bug fixes.
11540         (name_to_index) Increments hash.used.  Sets `name' field of hash
11541         entry properly.
11542         (add_kern) Sets kern_max_used after rehashing.  Other bug fixes.
11543
11544         * hash.c: Return type changed.
11545
11546         * postscript.c: Continued development.  Now marks lines on the
11547         paper, but very buggy.
11548
11549 Sat Aug  3 20:50:35 1996  Ben Pfaff  <blp@gnu.org>
11550
11551         * Changed comments in many source files from `/* xxx /* yyy */' to
11552         `/* xxx */ /* yyy */' for cleanliness.
11553
11554         * arena.c: (arena_sd_strdup) New function.
11555         
11556         * ascii.c: (struct ascii_driver_ext) New member `file'.
11557         (ascii_init_driver) Fills out member `file' for initing; uses
11558         close_file_ext for closing drivers.
11559         (ascii_option) Changed %.*s back to %s because the a_string's are
11560         always null-terminated.
11561         (postopen, preclose) New functions.
11562         (ascii_open_page) Uses new style of open_file_ext.
11563         (ascii_option, commit_line_buf, output_lines) Use ext->file.file
11564         instead of this->output.
11565         (__assert_fail) Removed.
11566
11567         * cmdline.c: Changed syntax_message[].
11568
11569         * error.c: #include's <readline/history.h> only if the history
11570         library is available, not if just the readline library is
11571         available.
11572
11573         * filename.c: (expand_line) Removed alloca() support.
11574         (interp_vars) No longer tilde-expands argument.  Limit on output
11575         length removed.
11576         (tilde_expand) Now treats argument as path rather than filename.
11577         [!unix] Now is a no-op function.
11578         (search_path) Better verbose message formatting.
11579         (open_file, close_file) Comment fixes.
11580         (close_file) [!unix] Doesn't bother with pipes.
11581         (open_file_ext) Completely rewritten, interface revamped.
11582         (close_file_ext) New function.
11583
11584         * font.h: Comment changes.
11585
11586         * frequencies.q: Removed AIX alloca support since it doesn't use
11587         alloca.
11588
11589         * hash.c: Comment changes & additions.
11590         (hsh_create) Initializes entire table instead of first M entries.
11591         (hsh_probe) Stupid bug fixed.  Now it works.
11592         (hsh_dump) [GLOBAL_DEBUGGING] New function.
11593
11594         * main.c: (parse) Detects EOF properly in token-eating loop.
11595         Should the STOP token have its value changed to 0?
11596
11597         * misc.c: (blp_getdelim) [HAVE_GETDELIM] Now it's a macro.
11598         (blp_getline) Now it's a macro.
11599
11600         * output.h: (struct outp_driver) Removed members output, filename.
11601         
11602         * output.c: (outp_init) [!NO_POSTSCRIPT] Installs PostScript
11603         drivers in driver table.
11604         (outp_read_devices) Frees buf.  Warns if there are no active
11605         output drivers.
11606         (outp_configure_clear) Sets outp_configure_vec to NULL after
11607         deleting its elements.
11608         (configure_driver, destroy_driver) Removed references to output,
11609         filename members of outp_driver.
11610         (outp_evaluate_dimension, internal_get_paper_size,
11611         outp_get_paper_size) New functions.
11612
11613         * postscript.c: Continued development.  Now links but doesn't make
11614         any marks on the page.  Lotsa bugs I suppose.
11615
11616         * str.c: (strcasecmp) [!HAVE_STRCASECMP] New function.
11617
11618         * str.h: Comment changes.
11619
11620 Sat Jul 27 22:32:38 1996  Ben Pfaff  <blp@gnu.org>
11621
11622         * Removed dependencies on non-nested comments in several files.
11623         Also removed references to (unix || __unix__) in #if's since
11624         prefh.orig makes those two equivalent.
11625         
11626         * ascii.c: (ascii_open_global) Creates ascii_arena.
11627         (ascii_close_global) Destroys ascii_arena.
11628         (ascii_init_driver) Doesn't create ascii_arena.
11629         (ascii_copy_driver) Removed.
11630         (ascii_option) Possible bugfix regarding %s vs. %.*s with a_string's.
11631         (outp_class ascii_class) Removed ascii_copy_driver reference.
11632
11633         * frequencies.q: Now can display all statistics except median.
11634         Still not finished.
11635
11636         * output.c: Handles outp_class.ref_count so output class
11637         destructors are called properly.
11638         (add_class) Sets ref_count to 0.
11639         (configure_driver) Initializes class if ref_count++ is 0.
11640         (destroy_driver) Destructs class if --ref_count is 0.  Frees the
11641         class output file name.
11642         
11643         * output.h: (struct outp_class) Removed copy_driver, inited.
11644         Added ref_count.
11645
11646         * postscript.c: Completely replaced but not finished.
11647         
11648 Tue Jul 23 21:48:36 1996  Ben Pfaff  <blp@gnu.org>
11649
11650         * approx.h: #includes <float.h>.
11651
11652         * arena.h, arena.c: Many functions changed to take an arena **
11653         instead of an arena *, for consistency.  All callers changed.
11654         (arena_alloc) Now creates a new arena if passed *A that is NULL.
11655         (arena_destroy) Sets *A to NULL.
11656         
11657         * ascii.c: (delineate) Implements OUTP_T_VERT correctly.  Removed
11658         assertion that `width' be positive.
11659
11660         * command.c: Removed #if's from cmd_table.
11661         (walk_cmdtable_func) [0] New function (debug code).
11662         (init_cmd_parser) [0] Dumps out cmd_table (debug code).
11663         (parse_cmd) Doesn't return failure for unimplemented commands.
11664
11665         * common.h: (SYSMIS) Changed from DBL_MAX to -DBL_MAX.
11666         (SYSCODE) New constant macro.
11667
11668         * descript.q: Checks for positive n_variables before performing
11669         analysis.
11670
11671         * file-handle.q: (get_handle_by_filename) Bug fix: passes &f to
11672         avl_find instead of &fp as arg 2.
11673
11674         * frequencies.g, frequencies.q: Continued updating; now compiles &
11675         works again, but not complete.
11676
11677         * main.c: Changes to user messages.
11678
11679         * misc.c: (reverse) [0] New function.
11680
11681         * settings.h: Comment removed.  #includes "common.h".
11682
11683         * som.c: (som_set_null) New function.
11684         (som_set_value, som_set_string, som_set_text) More detailing
11685         assertions.
11686         (som_set_float) Implemented function.
11687         (dump_columnated_table) Bug fix regarding page breaks.
11688         (draw_cell) Bug fix regarding text that spilled out of a cell.
11689         (draw_intersection, draw_horz_rule, draw_vert_rule) No longer draw
11690         null lines.
11691         (get_cell_size) Support SCON_EMPTY cells.
11692         (get_table_size) When calculating rules' widths and heights, mask
11693         out SLIN_SPACING bit.  Added SOPT_X_HLTL support.
11694         
11695         * som.h: (som_any_cell) New option SOPT_X_HTLT.  Removed
11696         SOPT_X_SHADE.
11697         (struct som_submission_form) New member `header'; all users
11698         changed.
11699
11700         * val-labs.c: (get_label) User messages changed.
11701
11702         * var.h: Changed FREQUENCIES structures.
11703
11704         * vars-atr.c: (is_num_user_missing, is_str_user_missing) Made
11705         inline.
11706         
11707 Fri Jul 19 19:11:13 1996  Ben Pfaff  <blp@gnu.org>
11708
11709         * approx.h: Definition of EPSILON now depends on system's
11710         DBL_EPSILON.  Removed GNU C specific code.
11711         (cmpapx) Renamed approx_compare.
11712
11713         * frequencies.g, frequencies.q: Continued updating; still doesn't
11714         compile.
11715
11716         * groff-font.c: (name_to_index) Fix bug that kept it from
11717         compiling.
11718
11719         * hash.c, hash.h: Completed work.
11720
11721         * var.h: Changes to freq_tab, frequencies_proc.
11722         
11723 Wed Jul 17 21:23:36 1996  Ben Pfaff  <blp@gnu.org>
11724
11725         New hashing code.
11726         * hash.c, hash.h: New files.  Not completed.
11727         * Makefile.am: Added hash.c to source file list.
11728         * font.h: (struct font_desc) New member kern_size_p.
11729         * groff-font.c: Uses hash.h.
11730         (hashpjw) Moved to hash.c.
11731         (next_prime_power) Rewrote, renamed hsh_next_prime, moved to
11732         hash.c.
11733         (static var hash) New member size_p.
11734         * var.h: Includes hash.h.
11735         (struct freq_tab) Changed AVL_TREE to hash_tab.
11736
11737         * vars-prs.c: Comment, formatting fixes.
11738
11739         * frequencies.g, frequencies.q: Continued updating.  Not yet
11740         working.
11741
11742         * formats.c: Bug fix.
11743
11744 Tue Jul 16 22:10:04 1996  Ben Pfaff  <blp@gnu.org>
11745
11746         Increasing parallelism between DESCRIPTIVES and FREQUENCIES.
11747         * descript.g: Comment fixes.
11748         * descript.q: Comment fixes.  Moved some declarations into var.h.
11749         Made dsc_info a static table.  Updated FIXMEs.
11750         (internal_cmd_descriptives) Beautified.
11751         
11752         * frequencies.q: Started updating into working order.
11753         * frequencies.g: New file analogous to descript.g.
11754         * var.h: Comment fixes.  Added structures for FREQUENCIES.
11755         
11756         * som.c: Removed vestiges of crushing and partial table support.
11757
11758 Sun Jul 14 15:45:31 1996  Ben Pfaff  <blp@gnu.org>
11759
11760         * Many more changes to som.c especially, but these will not be
11761         documented as I have resolved to remove them.  This patchlevel is
11762         being released solely so that I can fall back to it if I decide
11763         that removing the changes is not a good idea.
11764
11765 Sat Jul 13 09:58:44 1996  Ben Pfaff  <blp@gnu.org>
11766
11767         * som.c: (global var som) New member `cum_y'.
11768         (build_target) Properly handles titles for partial tables.
11769         (dump_partial_beg, dump_partial_mid, dump_partial_end)
11770         Merged into single new function dump_partial().  Fixed problem
11771         with titles on partial tables.
11772         (dump_table) Calls dump_partial() for all parts of partial tables.
11773         (dump_page) Criteria for drawing title changed.
11774         
11775 Fri Jul 12 22:03:36 1996  Ben Pfaff  <blp@gnu.org>
11776
11777         * command.c: (cmd_table) Added LIST, WEIGHT.
11778
11779         * command.c: (cmd_remark) No longer frees `s' since it's not
11780         dynamically allocated.
11781         
11782         * data-out.c: (convert_f) Now correctly handles the case where
11783         abs(v->f)<1 but v->f rounds to a value of 1.00 given the specified
11784         number of decimals.
11785         (som_destroy_all_tables) Removed argument.  All callers changed.
11786         (som_vline, som_hline) Argument validity checking corrected.
11787         (som_set_value) Implemented half-heartedly.
11788         (replicate_table) Copies tables piece-by-piece when using Checker.
11789
11790         * som.h: New line style SLIN_1THIN, currently equivalent to
11791         SLIN_0.  New enum set SOM_SUB_*.
11792         (struct som_submission_form) Removed `seq_no'.  Added `type'.
11793         
11794         * list.q: Newly working file; uses partial tables.
11795         
11796         * som.c: (som_reduce_table) Renamed som_set_table_height().
11797         (som_crush) Removed argument `group'.
11798         (global var som) Removed `nt', `seq_no'.  Added `type'.
11799         (som_submit_table) Arguments changed.
11800         (output_table) Removed partial table code.
11801         (build_target) New arg; partial table support added.  All callers
11802         changed.
11803         (dump_plain_table) Removed partial table code.
11804         (dump_partial_beg, dump_partial_mid, dump_partial_end) New functions.
11805         (dump_table) Supports partial tables.
11806         (dump_page) New argument to allow not drawing top and/or bottom
11807         headers.  All callers changed.  Supports partial tables.
11808
11809 Sat Jul  6 22:22:25 1996  Ben Pfaff  <blp@gnu.org>
11810
11811         * data-out.c: Changed `#include <approx.h>' to `#include
11812         "approx.h".
11813         (convert_F) Comment fix.  Now won't print `-.000', etc.
11814
11815         * descript.q: Now Z-scores work, although there appears to
11816         be a bug (which might actually be in data-out.c:convert_F()).
11817         (descriptives_trns_proc, descriptives_trns_free) New functions.
11818         (run_z_pass) Implemented.
11819         
11820         * var.h: Comment fixes.
11821         (dsc_z_score, descriptives_trns) New structs.
11822         (descriptives_trns) Added to any_trns as `dsc'.
11823
11824         * error.c, error.h: New error class, IS (Installation Script
11825         error), used in those instances where the error is in the
11826         installation, but there is a script file or installation file that
11827         can be usefully referred to.
11828         
11829         * output.c: Change many IE classes to IS classes.
11830
11831         * cases.c, command.c, common.c, crosstabs.q, expr-evl.c,
11832         frequencies.q, list.q, vars-prs.c, vfm.c: Removed reference to
11833         HAVE_MALLOC_H because Borland C++ alloca() is broken, so why
11834         include the corresponding header?
11835         
11836         * glob.c: (init_glob) Don't malloc term_buffer under Checker.
11837         Don't bail out if termcap can't be read.
11838
11839         * som.c: (som_destroy_table) Removed.
11840         (som_reduce_table, som_destroy_all_tables) New functions.
11841         (som_crush) New function, not implemented.
11842         
11843         * som.h: New table option STAB_CRUSH.  Comment fix.  New struct
11844         som_submission_form.  Function prototypes revised.
11845
11846         Outputting huge tables (1000s of rows) a few rows at a time
11847         is supported, though untested.  May even break everything.
11848         Actually, the code doesn't even compile right now.
11849         * som.c: (struct som) New fields htv, nt, seq_no.
11850         (som_submit_table) Multiple arguments changed to a single
11851         pointer to struct submission_form.  Only increments subtable_num
11852         if seq_no is zero.  Only destroys table if it's not going to
11853         be reused.
11854         (replicate_table) New function.
11855         (output_table) Comment fix.
11856         (examine_table) Changed inline code to code calling
11857         replicate_table().  Calculates htv.  Supports partial tables.
11858         (draw_title) Removed comment.
11859         (build_target) Only allows for title on first part of partial
11860         tables.
11861         (dump_plain_table) Only resets table chunk number on first part
11862         of partial tables; FIXME: doesn't work quite right.  Supports
11863         partial tables.
11864         (dump_page) Titles only on first part of partial tables.
11865
11866 Fri Jul  5 20:16:19 1996  Ben Pfaff  <blp@gnu.org>
11867
11868         * Thanks to an unreliable IDE hard drive, I have spent the last
11869         day reconstructing my Debian GNU/Linux installation and redoing
11870         the previous day's changes--somehow I managed to save every file
11871         except for output.c and output.h.  So the following changes could
11872         really be considered independent of the output.c, output.h changes
11873         from Jul 4.
11874
11875         * output.h, output.c: Moved the outp_configure_vec global var,
11876         outp_names struct, and enum set OUTP_S_* from output.h to output.c.
11877         outp_configure_vec is now static.
11878         
11879 Thu Jul  4 20:20:24 1996  Ben Pfaff  <blp@gnu.org>
11880
11881         * The entire philosophy behind configuration of the output drivers
11882         changed.  Now there is a termcap-type configuration where drivers
11883         to be read are determined beforehand, rather than parsing the
11884         entire output init file and storing it in memory & deciding what
11885         to actually use later.  Faster & more memory-efficient at the same
11886         time, cool.
11887         
11888         * output.c: Comment fix.  Removed outp_init_drivers global var.
11889         Removed all references to synonyms.  New structure outp_defn.  New
11890         global vars outp_macros, outp_configure_vec.
11891         (search_name, delete_name, add_name, check_configure_vec,
11892         expand_name, find_defn_value) New static functions.
11893         (outp_configure_clear, outp_configure_add, outp_configure_macro,
11894         outp_read_devices) New extern functions.
11895         (outp_init) Much functionality moved into outp_read_devices.
11896         (outp_read_devices) Format of output init file changed; name of
11897         file is `devices' rather than `output' to avoid Makefile
11898         conflicts.
11899         (outp_clear) Renamed outp_done.
11900         (outp_list_classes) Bug fix, cleaned up.
11901         (outp_list_drivers) Not implemented anymore.
11902         (outp_configure_driver) Now a static function; simplified; now
11903         interpolates macros; supports new structure.
11904         (outp_enable_driver, match_synonym) Removed; all references
11905         removed.
11906         (find_driver) First argument removed.
11907         
11908         * output.h: Global var outp_init_drivers removed; new structure
11909         outp_names; new enum set OUTP_S_*; new global var
11910         outp_configure_vec; function prototypes for output.c exports
11911         updated.
11912         
11913         * main.c: (main) Calls outp_read_devices() after parsing the
11914         command line.
11915         
11916         * cmdline.c: (parse_command_line) New option -v --verbose;
11917         --version changed to -V.  --device option changed syntax to just
11918         take a single device name.  Accepts key=value declaration of
11919         output init file macros.  Syntax message updated.
11920
11921         * filename.c: (expand_line) New function.
11922         (interp_environ_vars) Renamed interp_vars; no longer uses
11923         fixed-size buffer.
11924         (blp_getenv) Allows $ARCH and $VER pseudo-environment-vars to be
11925         overridden by real environment vars.
11926         (search_path) Uses verbose_msg() instead of #ifdef'd printf().
11927         * filename.h: interp_environ_vars() renamed interp_vars().
11928         
11929         * error.c, error.h: Added extern variable `verbosity', message
11930         class MM.
11931         
11932         * error.c: (vmsg) Support message class MM.
11933         (verbose_msg) New function.
11934
11935         * descript.q: (generate_z_varname) Bug fix in generation of
11936         Z-score varnames.
11937         (dump_z_table) Bug fix in column headers.
11938         
11939         * ascii.c: (ascii_init_driver) Changed minimum number of lines per
11940         page from 29 to 15.  Don't set a default for ops[OPS_INIT,
11941         OPS_DONE].  Writes the uninit string when the driver is closed.
11942         (ascii_open_page) Write the init string before the first page.
11943         (output_shorts) Form of main loop changed from `while' to `for'.
11944         Bug fix with overstrikes: the character is printed *after* the
11945         backspace.  Eliminated a lot of `& 0xff' modifiers.
11946         (advance_to_left_margin) New function.
11947         (return_carriage, output_lines) Handle left margin.
11948
11949 Thu Jul  4 00:35:59 1996  Ben Pfaff  <blp@gnu.org>
11950
11951         * ascii.c: New option `carriage-return-style'.
11952
11953         * ascii.c: (count_fancy_chars) New function.
11954         (delineate, text_metrics) Use new function; bug fixes regarding
11955         rich text strings.
11956         (text_draw) Bug fix with rich text.
11957         (output_string, output_shorts) Reordered.
11958         (output_shorts) Now handles boxchars and some overstrike font
11959         changes.
11960         (output_char, return_carriage) New functions.
11961         (output_lines) Now handles overstriking and font changes properly;
11962         some code moved to output_shorts.
11963
11964 Tue Jul  2 22:13:23 1996  Ben Pfaff  <blp@gnu.org>
11965
11966         [GLOBAL_DEBUGGING]
11967         * ascii.c: New member `debug' in ascii_driver_ext.
11968         (ascii_init_driver, delineate) Uses new member.
11969
11970         Now you can set a vertical height on writing text.
11971         * ascii.c: (delineate) Keeps track of vertical position.
11972         (text_draw) No longer considers fully justified text an internal
11973         error.
11974         
11975         * output.h: New flag OUTP_T_VERT; other OUTP_T_ values changed.
11976
11977         Tables' titles are drawn; they can have variable height.
11978         * som.c: `som' struct has new member, title_height.
11979         (draw_title) New argument.  Moved within file.  All caller
11980         changed.
11981         (build_target) New argument, amount of space needed for first row.
11982         Calculates height of title, takes that into account.  All callers
11983         changed.
11984         (dump_plain_table, dump_columnated_table) Took calculation of y1,
11985         y2 out of loop.
11986         (dump_columnated_table) [GLOBAL_DEBUGGING] Debugging code
11987         improved.
11988         (dump_columnated_table) Organized for readability.
11989         (dump_page) Makes use of som.title_height.
11990
11991         * som.c: Many comment bug fixes.
11992
11993         * descript.q: (try_name, generate_z_name) Bug fix regarding
11994         generation of Z-score variable names.
11995         * var.h: Removed num from descriptives_proc; all referents removed.
11996
11997 Mon Jul  1 22:13:39 1996  Ben Pfaff  <blp@gnu.org>
11998
11999         * ascii.c: (ascii_line_horz, ascii_line_vert,
12000         ascii_line_intersection) Added debugging code.
12001
12002         Added a descriptive line above each table to describe it.
12003         * command.c: (parse_cmd) Calls som_new_series.
12004         
12005         * som.c: New static vars table_num, subtable_num.  New `som'
12006         member `title'.
12007         (dump_page) New arguments.
12008         (som_submit_table) Handle new variables.
12009         
12010         * som.c, som.h: (som_submit_table) New arguments.  All callers
12011         changed.
12012         (som_new_series) New function.
12013         (build_target) Makes room for extra line.
12014         (draw_title) New function.
12015         (dump_page) Calls draw_title.  Bug fix: doesn't always set
12016         som.ext->cp to 0.
12017         
12018         Columnation of tables support.
12019         * som.h: Deleted fr, lr, ri from som_table.  Reorganized.
12020         
12021         * som.c: Deleted references to fr, lr, ri.
12022         (som_columnate) Bux fix: sets group member of table.
12023         (som_add_options) Function removed.
12024         (dump_table) Split into three functions; extensively reworked.
12025         
12026         * descript.q: (dump_z_table) Better output table formatting; added
12027         title support to correspond to som.h changes.
12028         (display) Title support.
12029
12030         * output.h: Added OUTP_T_NONE.
12031         
12032 Mon Jul  1 13:00:00 1996  Ben Pfaff  <blp@gnu.org>
12033
12034         * descript.q: Improved handling of Z scores; still not perfect.
12035         
12036         * output.h, ascii.c: Added hook for getting em width of current
12037         font.
12038         
12039         * som.c: Uses new em-width hook.  Added debugging code to
12040         several functions.
12041         (som_columnate) New argument.
12042         (som_add_options) Removed.
12043
12044 Jun 29 17:40:47 1996  Ben Pfaff  <blp@gnu.org>
12045
12046         * som.h, som.c, output.c, output.h, ascii.c: Updated to work with
12047         rules as a property of the table instead of as a property of the
12048         cells.
12049         
12050         * ascii.c: Added `header' to table of options.
12051         
12052         * descript.q: Added even shorter statistic names; modified to work
12053         with new som interface.
12054         
12055         * misc.c (blp_getdelim): Bug fix.
12056         
12057         * version.c: includes 'conf.h'.
12058         
12059 ----------------------------------------------------------------------
12060 Local Variables:
12061 mode: change-log
12062 version-control: never
12063 End: